We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
In my previous note Shorter feedback loops with Elixir tests I already described how to run tests in Elixir, where it only runs the failed tests. Below is what I put in my mix.exs file to have faster feedback loops when testing:
defp aliases do [ ... "test.failed": ["test --failed --max-failures 1"], ] end # Make sure the alias runs in the test MIX_ENV environment. def cli do [preferred_envs: ["test.failed": :test]] end
This will create a new alias test.failed that will run only the failed tests and stop after the first failure. This is useful when you are working on a specific test and you want to run it quickly without running all the tests.
continue reading on petar.dev
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.