Fix vitest test running and debugging for v4 with backwards compatibility#43241
Merged
cole-miller merged 2 commits intozed-industries:mainfrom Dec 15, 2025
Merged
Conversation
Author
|
Note that I built the project and tested it with both vitest 3 and 4. I notice that Webstorm is also having this problem! |
freddyfallon
commented
Nov 21, 2025
crates/languages/src/typescript.rs
Outdated
| "Bun should come before Node" | ||
| ); | ||
| } | ||
|
|
Author
There was a problem hiding this comment.
Not sure if we actually want these tests that I added. Like how useful are they really?
Member
There was a problem hiding this comment.
Yeah I don't think we need them
Author
|
Ah, I tested this on v1, v2, v3, and v4 and they all worked. However, I did get this when running on v0.34.6: throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);So I guess this PR will fix running modern vitest tests, but will break anything pre v1. Let me know if you want me to handle that. |
Member
|
Thanks! |
CherryWorm
pushed a commit
to CherryWorm/zed
that referenced
this pull request
Dec 16, 2025
…lity (zed-industries#43241) ## Summary This PR updates the vitest test runner integration to use the modern `--no-file-parallelism` flag instead of the deprecated `--poolOptions.forks.minForks=0` and `--poolOptions.forks.maxForks=1` flags. ## Changes - Replaced verbose pool options with `--no-file-parallelism` flag in both file-level and symbol-level vitest test tasks - This change works with vitest v4 while maintaining backwards compatibility with earlier versions (or 3 at least!) ## Testing - Added test `test_vitest_uses_no_file_parallelism_flag` that verifies: - The `--no-file-parallelism` flag is present in generated test tasks - The deprecated `poolOptions` flags are not present - Manually tested with both vitest v4 and older versions to confirm backwards compatibility - All existing tests pass ## Impact This allows Zed users to run and debug vitest tests in projects using vitest v4 while maintaining support for earlier versions. Release Notes: - Fixed vitest test running and debugging for projects using vitest v4 --------- Co-authored-by: Cole Miller <cole@zed.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the vitest test runner integration to use the modern
--no-file-parallelismflag instead of the deprecated--poolOptions.forks.minForks=0and--poolOptions.forks.maxForks=1flags.Changes
--no-file-parallelismflag in both file-level and symbol-level vitest test tasksTesting
test_vitest_uses_no_file_parallelism_flagthat verifies:--no-file-parallelismflag is present in generated test taskspoolOptionsflags are not presentImpact
This allows Zed users to run and debug vitest tests in projects using vitest v4 while maintaining support for earlier versions.
Release Notes: