Closed hahuang65 closed 2 years ago
I don't believe there is currently but I open the summary pane and press r
at the top of the tree:
You can get a similar effect by passing a directory in to the run command
require("neotest").run.run(vim.fn.getcwd())
Thanks @stevearc your suggestion works pretty well in most cases!
Yeah I've always just used getcwd()
but I can see how that wouldn't work all the time. Not sure of what a nice interface would be. Simple solution I think would have a function to get the root directory and then supply that to the run function.
E.g. neotest.run.run(neotest.run.root())
though if there's a way to extend the current run
args to say "run everything" then I'd prefer that, so open to ideas
OK I've added a suite
arg to neotest.run.run
, so just set { suite = true }
in the args :smile:
The root()
function would have required users to wrap it in plenary's async library which would be a pain
@rcarriga testing this with multiple adapters in the same Neovim instance and it only runs tests for the first adapter.
That is intended behaviour. I've added neotest.run.adapters()
to get the known adapter IDs.
for _, adapter_id in ipairs(neotest.run.adapters()) do
neotest.run.run({ suite = true, adapter = adapter_id })
end
Is there a command to run the entire test suite of a project?