-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
Description
Describe the bug
When running vitest against a config with multiple vitest projects, filtering out browser projects (with the negation/! operator) does not work. The expected behaviour and current behaviour over various filtering scenarios is laid out in the following table:
| filter | expected # of tests | actual # of tests | result |
|---|---|---|---|
| none | 2 | 2 | 🟢 |
--project node |
1 | 1 | 🟢 |
--project browser |
1 | 1 | 🟢 |
--project !node |
1 | 1 | 🟢 |
--project !browser |
1 | 2 | 🔴 |
These are the above results executed on the attached reproduction:
Reproduction
https://github.com/james-camilleri/vitest-project-filtering-reproduction
System Info
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 AMD Ryzen AI 7 PRO 350 w/ Radeon 860M
Memory: 3.13 GB / 23.65 GB
Binaries:
Node: 24.14.1 - C:\Users\JamesCamilleri\scoop\apps\nodejs-lts\current\node.EXE
Yarn: 1.22.22 - C:\Users\JamesCamilleri\scoop\apps\nodejs-lts\current\bin\yarn.CMD
npm: 11.11.0 - C:\Users\JamesCamilleri\scoop\apps\nodejs-lts\current\npm.CMD
pnpm: 10.33.0 - C:\Users\JamesCamilleri\scoop\shims\pnpm.EXE
Deno: 2.7.7 - C:\Users\JamesCamilleri\scoop\shims\deno.EXE
Browsers:
Edge: Chromium (145.0.3800.82)
npmPackages:
@vitest/browser-playwright: ^4.1.2 => 4.1.2
vite: ^8.0.1 => 8.0.3
vitest: ^4.1.2 => 4.1.2Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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.
Reactions are currently unavailable