Removing ExUnit.start() still runs the tests

Hello,

I was trying to figure out why my logger configuration is not used when running the tests with mix test --no-start and a manual app start. (I found out we must restart the logger application).

And while debugging I just removed ExUnit.start() to see if it was resetting the config, and the test suite still runs. Is that expected? Is ExUnit.start()'s purpose only to customize the run but tests are always executed?

I believe mix test sets the autorun (or similar) configuration in ExUnit to true. That’s why in practice you don’t even need to call ExUnit.start, only configure.

2 Likes