zidhuss / neotest-minitest

Neotest adapter for Minitest
MIT License
11 stars 15 forks source link

Run directory fires off process for each file? #21

Open nulty opened 4 months ago

nulty commented 4 months ago

I've noticed that neotest-minitest (and maybe it's the default behaviour in neotest) fires off a separate process for each file in a directory when running noetest on a directory.

I'm using Rails, so bundle exec rails test /path/to/directory

Is there a way to pass the directory to the minitest runner and let it run each file?

I suppose neotest needs to parse the test output, and opening the output for a file should show the test results for just that file.

But it's impossible to reliably run a directory of tests against a database without unique constraints and deadlock errors.

I'm interested to hear your thoughts on this problem.

image

image

image

nulty commented 4 months ago

Ok, so you can initialize neotest with the options:

https://github.com/nvim-neotest/neotest/blob/v5.1.0/lua/neotest/config/init.lua#L158

  running = {
    concurrent = false,
  },

And the tests will run synchronously.

There is still an issue if you want to run Rails parallelized tests however.