This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

16 lines
377 B
Markdown
Raw Permalink Normal View History

2021-04-02 02:24:13 +03:00
# collect-v8-coverage
Use this module to start and stop the V8 inspector manually and collect precise coverage.
```js
const {CoverageInstrumenter} = require('collect-v8-coverage');
const instrumenter = new CoverageInstrumenter();
await instrumenter.startInstrumenting();
// require some modules, run some code
const coverage = await instrumenter.stopInstrumenting();
```