Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ function validateBrowserCoverage(
`Code coverage is enabled, but the following configured browsers do not support the V8 coverage provider: ` +
`${unsupportedBrowsers.join(', ')}. ` +
`V8 coverage is only supported on Chromium-based browsers (e.g., Chrome, Chromium, Edge). ` +
`Please disable coverage or remove the unsupported browsers.`,
`Please use the "istanbul" coverage provider (requires "@vitest/coverage-istanbul"), ` +
`remove the unsupported browsers, or disable coverage.`,
);
}
}
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/tests/vitest/browser-coverage-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export default async function (): Promise<void> {
/Code coverage is enabled, but the following configured browsers do not support the V8 coverage provider: firefox/,
'Expected validation error for unsupported browser with coverage (config name).',
);
assert.match(
output2,
/Please use the "istanbul" coverage provider/,
'Expected the error to suggest the istanbul coverage provider.',
);

// === Case 3: Browser configured via vitest.config.mts (instances) ===
await writeFile(
Expand Down
Loading