Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个项目 A,它也依赖于我创建的依赖项 B...
当我想用一个简单的 A 启动测试时mix test,它得到了依赖 B,编译它并在环境中启动它:prod......
mix test
:prod
这意味着A在:test环境中,B在环境中:prod。
:test
我想让测试在环境中启动依赖:dev项(或其他任何东西:prod),有没有办法做到这一点?
:dev
也许您的MIX_ENVisprod并且mix test不会将其更改为test. 明确尝试:
MIX_ENV
prod
test
MIX_ENV=test mix test and for dev MIX_ENV=dev mix test