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
-`v8` with [`experimentalAstAwareRemapping: true`](https://vitest.dev/config/#coverage-experimentalAstAwareRemapping) see [ast-v8-to-istanbul | Ignoring code](https://github.com/AriPerkkio/ast-v8-to-istanbul?tab=readme-ov-file#ignoring-code)
342
341
343
342
When using TypeScript the source codes are transpiled using `esbuild`, which strips all comments from the source codes ([esbuild#516](https://github.com/evanw/esbuild/issues/516)).
344
343
Comments which are considered as [legal comments](https://esbuild.github.io/api/#legal-comments) are preserved.
Copy file name to clipboardExpand all lines: docs/guide/migration.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,21 @@ export default defineConfig({
21
21
})
22
22
```
23
23
24
+
### V8 Code Coverage Major Changes
25
+
26
+
Vitest's V8 code coverage provider is now using more accurate coverage result remapping logic.
27
+
It is expected for users to see changes in their coverage reports when updating from Vitest v3.
28
+
29
+
In the past Vitest used [`v8-to-istanbul`](https://github.com/istanbuljs/v8-to-istanbul) for remapping V8 coverage results into your source files.
30
+
This method wasn't very accurate and provided plenty of false positives in the coverage reports.
31
+
We've now developed a new package that utilizes AST based analysis for the V8 coverage.
32
+
This allows V8 reports to be as accurate as `@vitest/coverage-istanbul` reports.
33
+
34
+
- Coverage ignore hints have updated. See [Coverage | Ignoring Code](/guide/coverage.html#ignoring-code).
35
+
-`coverage.ignoreEmptyLines` is removed. Lines without runtime code are no longer included in reports.
36
+
-`coverage.experimentalAstAwareRemapping` is removed. This option is now enabled by default, and is the only supported remapping method.
37
+
-`coverage.ignoreClassMethods` is now supported by V8 provider too.
38
+
24
39
### Removed options `coverage.all` and `coverage.extensions`
25
40
26
41
In previous versions Vitest included all uncovered files in coverage report by default.
0 commit comments