-
-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
Description
Describe the bug
Opening a vscode folder with a vitest.workspace.js file present appears to stop the include/exclude matching from working, and instead leads to every single *.spec.* file found being included in the Testing sidebar. As soon as I remove the vitest.workspace.js file the list behaves as expected, only including files that have been listed in vitest configs.
Reproduction
https://github.com/mogelbrod/vscode-vitest-bug
Output
[INFO 17:45:01] [v0.0.0] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 17:45:01] [API] Resolving workspace configs: vitest.workspace.js
[INFO 17:45:01] [API] Running Vitest v4.0.14 (temp/vitest.workspace.js) with "/Users/victor/.asdf/shims/node /Users/victor/.vscode/extensions/vitest.explorer-1.32.1/dist/worker.js"
[INFO 17:45:01] [API] Resolving configs: nested/vitest.config.js
[INFO 17:45:01] [API] Running Vitest v4.0.14 (nested/vitest.config.js) with "/Users/victor/.asdf/shims/node /Users/victor/.vscode/extensions/vitest.explorer-1.32.1/dist/worker.js"
[INFO 17:45:02] [API] Watching vitest.workspace.js
[INFO 17:45:02] [VSCODE] Watching temp with pattern **/*
[INFO 17:45:02] [API] Watching nested/vitest.config.js
[17:45:03] [VSCODE] Ignoring file: .git/FETCH_HEAD
[17:45:03] [VSCODE] Ignoring file: nested/vitest.config.js.gitExtension Version
1.32.1
Vitest Version
4.0.14
Validations
- Check that you are using the latest version of the extension
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.