Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test Mix task should exit with 1 when --warnings-as-errors opt is used
Previously some warnings were not detected as errors, exiting the command with 1. An example is wronly naming a test file with the extension .ex instead of .exs A test app has been uploaded to: https://github.com/eksperimental-debug/debug_elixir_test_wrong_ext Previously: ❯ mix test --warnings-as-errors; echo $? Compiling 1 file (.ex) Generated debug_elixir_test_wrong_ext app warning: test/foo_test.ex does not match "*_test.exs" and won't be loaded Running ExUnit with seed: 194476, max_cases: 20 .. Finished in 0.00 seconds (0.00s async, 0.00s sync) 1 doctest, 1 test, 0 failures 0 Now: ❯ mix test --warnings-as-errors; echo $? Compiling 1 file (.ex) Generated debug_elixir_test_wrong_ext app warning: test/foo_test.ex does not match "*_test.exs" and won't be loaded Running ExUnit with seed: 560339, max_cases: 20 .. Finished in 0.00 seconds (0.00s async, 0.00s sync) 1 doctest, 1 test, 0 failures ERROR! Test suite aborted after successful execution due to warnings while using the --warnings-as-errors option 1 All tests will be executed, the warning is printed, but it prints an error message and exits with 1.
- Loading branch information