Skip to content

Instantly share code, notes, and snippets.

View cenfun's full-sized avatar
🏠
Working

CenFun cenfun

🏠
Working
View GitHub Profile
@cenfun
cenfun / native-v8-coverage-report.md
Last active January 28, 2024 10:34
Embracing Native V8 Coverage Reports in 2024

Embracing Native V8 Coverage Reports in 2024

Background and Current Situation

As early as 2017, V8 started offering native support for coverage data, as seen here However, we have essentially only been able to see coverage reports from Istanbul, and this is because most testing tools convert native V8 coverage data into the format of Istanbul, such as Jest, Vitest. This has led to several issues:

  • Native Byte coverage statistics are not available.
  • Coverage support for runtime code, especially minified code, is not available.
  • CSS coverage reports are not available.
  • The commonly used conversion tool is v8-to-istanbul, but it has a few problems here