You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v3] Browser Mode: @vitest/coverage-v8 should work with multiple instances and --project=chromiumΒ #7286
feat: browserIssues and PRs related to the browser runnerfeat: coverageIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)
I completely understand that v8 can only support chromium. But it would be good if v8 would not only look at the config, but also at the --project before throwing an error.
> vitest run --coverage --project="browser (chromium)"
β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β― Startup Error β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―β―
Error: @vitest/coverage-v8 does not work with
{
"browser": {
"provider": "playwright",
"instances": [
{
"browser": "chromium"
},
{
"browser": "firefox"
}
]
}
}
Suggested solution
coverage error should take project filter into account
changed the title [-][v3] Browser Mode: `@vitest/coverage-v8` does not work with multiple instances and `--project=chromium`[/-][+][v3] Browser Mode: `@vitest/coverage-v8` should work with multiple instances and `--project=chromium`[/+]on Jan 18, 2025
$ pnpm vitest --version
vitest/3.0.3 linux-x64 node-v22.11.0
$ pnpm vitest --project "browser (chromium)" --coverage
(...) Error: @vitest/coverage-v8 does not work with (...)
$ pnpm vitest --project unit --coverage # Does not even use browser testing
(...) Error: @vitest/coverage-v8 does not work with (...)
feat: browserIssues and PRs related to the browser runnerfeat: coverageIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)
Activity
[-][v3] Browser Mode: `@vitest/coverage-v8` does not work with multiple instances and `--project=chromium`[/-][+][v3] Browser Mode: `@vitest/coverage-v8` should work with multiple instances and `--project=chromium`[/+]AriPerkkio commentedon Jan 19, 2025
The check is done around here:
vitest/packages/vitest/src/node/config/resolveConfig.ts
Lines 254 to 272 in 5c289e9
cyyynthia commentedon Jan 22, 2025
I still observe this issue on Vitest 3.0.3
OrbisK commentedon Jan 22, 2025
Can confirm that it does not work.
Reproduction: (not minimal)
pnpm vitest run --coverage --project="browser (chromium)"