nvim-neotest/neotest

Add ability to run all tests

Closed this issue · 2 comments

Problem: Often when I'm coding, I want to run every test in a project. Right now, my workflow is to open the summary window, navigate to the summary window, and press r over the highest level test group.

Solution: I would like to have a neotest.run.all() command that runs every test that has been discovered, and then optionally opens the summary window on failure.

Alternatives I've considered:

  • Just running the all tests once and then doing neotest.run.run_last(). The problem here is that if I run a singular test while debugging some issue, that test becomes my last test. Then I can no longer run all tests
  • Watching the directory, but that can sometimes cause not every test to be re-run (for example, if you have integration style tests that don't directly reference the symbols you're changing)

@rudiejd you can do this using neotest.run.run(vim.fn.getcwd())

that works for me... can't believe I missed that option 🙃