jfpedroza / neotest-elixir

Neotest adapter for Elixir
MIT License
41 stars 10 forks source link

Specify full path for umbrella projects #18

Closed fuelen closed 10 months ago

fuelen commented 1 year ago

I noticed, that if I have opened an umbrella project, and I'm in the root of it, then tests are launched using not full paths. Let's say we have the following structure:

apps/
  foo/
    test/
      foo_test.exs
  bar/
    test/
      bar_test.exs
  ... # other projects

and when I ask to run tests for foo_test.exs, then the following command is executed:

mix test test/foo_test.exs

and mix tries to find the file in all the projects and reports these messages for every umbrella project:

Paths given to "mix test" did not match any directory/file: test/foo_test.exs
==> bar

it would be great if for umbrella projects the following command is executed:

mix apps/foo/test/foo_test.exs

Such approach would increase the speed of running tests.

jfpedroza commented 1 year ago

It must be because it detects the mix.exs of the child app as the root. I don't work with umbrella projects, so I hadn't noticed. Should be possible to detect the root properly.