lud
How to get type warnings before test failure reports
Hello,
I do TDD a lot and so my code, notably my test code, is very often incorrect compared to the current implementation (since the purpose is to then change that implementation, obviously).
The problem is that whenever I run mix test [...], test failures are printed and then the test warnings are printed. When using AI to write more tests it’s a giant waterfall of type warnings. This is bad because when focusing on tests I just have to scroll a lot after each test execution, and that is very often.
Is there a way to enforce test failures being the last thing printed? The "Finished in XX seconds, N failures, N skipped etc. block is still last.
Also I’m not really sure why the current behaviour exists. Warnings supposed to be emitted during compilation (alhough .exs file) and test failures after test execution, so warnings should be before failures (for a same file at least, which is good enough for me).
Erlang/OTP 29 [erts-17.0.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]
Interactive Elixir (1.20.1) - press Ctrl+C to exit (type h() ENTER for help)
Edit: after a bit of exploration with Claude, it seems this is because my test is async: true and tests are executed whenever a file is compiled whereas warnings are printed when there is no more file in the compilation queue (the “require phase”).
Is there a way to change that?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









