Istanbul Coverage Data
Collecting Istanbul Coverage Data
- Before coverage collection: Instrumenting source code with Istanbul
- webpack with babel loader: babel-plugin-istanbul, see example: webpack.config-istanbul.js
- CLI: nyc instrument or API: istanbul-lib-instrument
- vite: vite-plugin-istanbul
- rollup: rollup-plugin-istanbul
- swc: swc-plugin-coverage-instrument
Browser Collection
- Collecting coverage data from
window.__coverage__, example: test-istanbul.js
Node.js Collection
- Collecting coverage data from
global.__coverage__
CDP Collection
getIstanbulCoverage()see CDP Client API