I’m wondering if people have any tips for doing TDD with Elixir.
I am specifically wondering if it is possible to configure mix test to only show which tests failed. I find the output to be very noisy (lots of warnings, also shows skipped tests, etc.).
Note that I am accustomed to JavaScript’s Vitest test runner which comes with a TUI that puts test results at the top of the window so you don’t have to search for it. See screenshot at top of https://vitest.dev/
Wonder if there is something similar for Elixir / mix test.
Nothing fancy. When working on a file, mix test that/file_test.exs. Only run mix test once I’ve reached a good stopping point.
If I’m looking at a specific failure, mix test that/file_test.exs:5.
When I’m using vim, I dynamically map a leader key to write the current file and run a test. If I’m on vs code or zed, I use the integrated terminal because they recognize the FILE:LINE format to quickly open test locations or stack traces.
edit:
options like --no-all-warnings , --failed and more can be found here: