-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Due to project setup constraints, I'm unable to run tests from the project root on my umbrella project, I have to cd to apps/sub_app
and then run the test. I wonder if there's a way to configure the adapter in a way that it runs tests from the umbrella app root.
I tried to do that by modifying post_process_command
to run the test through mix cmd --app my_app test path/to/test.exs
. Here's my version of the run command:
elixir -r /Users/piacsek/.local/share/nvim/lazy/neotest-elixir/neotest_elixir/json_encoder.ex -r /Users/piacsek/.local/share/nvim/lazy/neotest-elixir/neotest_elixir/formatter.ex -S mix cmd --app my_app mix test --formatter NeotestElixir.Formatter --formatter ExUnit.CLIFormatter path/to/my/test.exs
But I when I run this command, the following output appears:
09:57:37.361 [error] CRASH REPORT Process <0.1422.0> with 0 neighbours crashed with reason: call to undefined function 'Elixir.NeotestElixir.Formatter':init([{include,[]},{exclude,[external,es_integration]},{max_cases,16},{seed,178117},{failures_manifest_file,...},...])
.....
Finished in 0.07 seconds (0.07s async, 0.00s sync)
5 tests, 0 failures
The tests pass, but the formatter fails to parse the results, making neotest
consider the test as a failure.
PS: I'm currently trying to alter my project in a way that I can run any test from the root of the project, but having that as a configuration could come in handy not just to me but to other people in a similar situation.