1
votes

I have a project A, which depends on a dependency B created by me also...

when I want to launch test on A with a simple mix test, it's getting the dependecy B, compiling it and starting it in :prod environnement...

Which mean A is in :test environnement and B is in :prod env.

I would like for the tests to launch the dependency in :dev environnement (or anything else but :prod), is there a way to do that ?

1
Although it looks an overkill here, one might introduce their own compiler and delegate compilation of B project in the requested environment to it. That way the project B in local would always have been compiled in the same environment as A currently is.Aleksei Matiushkin

1 Answers

1
votes

Maybe your MIX_ENV is prod and mix test doesn't change it to test. Try explicitly:

MIX_ENV=test mix test

and for dev

MIX_ENV=dev mix test