Closed sheremet-va closed 6 months ago
Very exciting stuff! Looking forward to this!
Excited to see this get merged
@ me if you'd like a review
Excited to see this get merged
@ me if you'd like a review
Yeah same! I check back every time there's a new commit 😍
Hmm, how is the continuous mode supposed to run if enabled for individual files? Will this work also? If so, how?
Hmm, how is the continuous mode supposed to run if enabled for individual files? Will this work also? If so, how?
Good question. Currently it only supports a single test block/describe block I think (but multiple files is fine), but it should be possible to have multiple test/describe blocks, we can just merge them into a single regexp.
Hmm, how is the continuous mode supposed to run if enabled for individual files? Will this work also? If so, how?
Good question. Currently it only supports a single test block/describe block I think (but multiple files is fine), but it should be possible to have multiple test/describe blocks, we can just merge them into a single regexp.
Awesome - will this be solved as part of this PR also, or?
Awesome - will this be solved as part of this PR also, or?
Yeah, should be possible. I made it so it runs tests correctly now, but it doesn't report the result because the test run uses a different request. I need to think more about the architecture there (already have some ideas). This PR should be merged this week after we release locations in Vitest, and I will publish it with a beta tag, so everyone can join in.
Awesome! 😍 Can't wait! Thanks for the status update.
Can you elaborate on what you mean by the request being different? Maybe me/others could then chime in with architecture proposals and/or ideas.
Awesome! How can I try this? :heart:
Context:
Yes, I know. I am rewriting our release script. Please be patient and just wait.
Released as 0.5.0 (we are using VSCode convention for pre-releases, not semver). Should be available to install if you switch the extension to a pre-release version:
Feel free to close affected issues and open new ones 😄
Hi @sheremet-va, just posting this here rather than making an issue as I didn't know if you wanted bug reports from the pre-release yet (having only just landed it!). I was curious to try it out with https://github.com/chriswheeldon-peakon/vitest-workspace-cwd but the extension fails to load with:
2024-03-15 14:27:52.495 [error] Activating extension vitest.explorer failed due to an error:
2024-03-15 14:27:52.495 [error] Error: Attempted to insert a duplicate test item ID /Users/jbloggs/code/vitest-workspaces
at Object.replace (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:138:24636)
at Ge.reset (/Users/jbloggs/.vscode/extensions/vitest.explorer-0.5.0/dist/extension.js:7:1888)
at Tt.defineTestProfiles (/Users/jbloggs/.vscode/extensions/vitest.explorer-0.5.0/dist/extension.js:7:5932)
at async Tt.activate (/Users/jbloggs/.vscode/extensions/vitest.explorer-0.5.0/dist/extension.js:7:7329)
This is a monorepo with multiple vite.config.ts files (one in each package).
Please, create a separate issue with a reproduction. This PR is not a place to follow all bugs with the current implementation.
We specifically released it as a pre-released to find all edge cases (like yours).
This PR switches to use public Vitest API instead of calling
vitest
CLI directly. Improvements that come with it:Known issues
vite.config
orvitest.config
file to function