cov8 - Native V8 coverage tool
Like nyc, cov8 just magically works:
yarn global add v8-coveragecov8 node foo.js
The above example will collect coverage for
foo.js using v8's inspector.
How to use
Like the above example you just need to run this command to collect coverage:
If you want to get a coverage report, you just need to run this:
cov8 report <reporter>
You can find the list of available reporters here.
If you want to clean the coverage folder, run this:
Some options can be pass as parameter like:
- include you can specify which files you want to cover
- exclude you can specify which files you want to don't cover
- coverage-directory where coverage files are stored (map/reports),
- forks use this option if you want to collect coverage from forked process
You can get more help with:
How it Works
Just before your application exits, cov8 fetches the coverage information from v8 and writes it to disk in a format compatible with Istanbul's reporters.