Open myronmarston opened 10 months ago
I think the test result formatting issue is not RSpec or addon-specific, because I also see it in projects that don't use RSpec and this addon. Would you mind opening an issue in the extension repo?
Wrt the main issue, I don't think there's much this project can do either. If you click the Run In Terminal
code lens on a test group, you'd notice that the command points to the group and tests are run in the same process as we'd expect. The same command is pushed to the extension and thus VS Code as well. But it looks like either VS Code doesn't use test group commands directly, or the vscode-ruby-lsp
is not communicating with it properly. So I think the discussion should happen in vscode-ruby-lsp
instead.
Dropping some direct links here to follow along. Looks like at least some work has been done on running minitest tests together, which I guess would help this repo eventually as well.
https://github.com/Shopify/ruby-lsp/issues/2402 and https://github.com/Shopify/ruby-lsp/pull/2230
First off, great work on this extension. It was really nice to be able to install it and have it "just work".
There is one thing that's not working great, though: the test results are very slow, and it appears that it's running each example individually (requiring a new ruby process to run and load
rspec
and my project code for each test!).For example, here's a screenshot of the output I'm seeing:
Notice that each spec takes roughly 800 ms. When I run the entire spec file by hand in my terminal, here's the results:
I'm also seeing output in "Test Results" that shows that it's filtering to each example individually:
(And yes, the output I'm seeing there is formatted really weirdly. Not sure why, but I left it in so you could see it. Not a big deal though.)
Could
ruby-lsp-rspec
run the full set of tests it intends to run as a singlerspec
command instead of runningrspec
separately for each test?