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
2 changes: 1 addition & 1 deletion packages/coverage-v8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"dependencies": {
"@bcoe/v8-coverage": "^1.0.2",
"@vitest/utils": "workspace:*",
"ast-v8-to-istanbul": "^0.3.8",
"ast-v8-to-istanbul": "^0.3.10",
"istanbul-lib-coverage": "catalog:",
"istanbul-lib-report": "catalog:",
"istanbul-reports": "catalog:",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/coverage-test/fixtures/src/untested-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export function math(a: number, b: number, operator: '*' | '+') {
return multiply(a, b)
}

/* v8 ignore start */
/* todo fix in https://github.com/vitest-dev/vitest/pull/9204 */
Copy link
Copy Markdown
Member Author

@AriPerkkio AriPerkkio Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will be fixed in

... where we apply patch for istanbul-lib-coverage so that start/stop ignore hint works on Istanbul provider too, and we can use same snapshot result for both providers.

This started to fail for V8 now due to https://github.com/AriPerkkio/ast-v8-to-istanbul/releases/tag/v0.3.9 as lines were ignored. This is expected.

if (operator === '+') {
// This line should be excluded
return add(a, b)
}
/* v8 ignore stop */
/* todo fix in https://github.com/vitest-dev/vitest/pull/9204 */

// This line should NOT be covered
throw new Error('Unsupported operator')
Expand Down
Loading