Use native v8 inspector to generate coverage reports
$ cnpm install v8-coverage
Code-coverage using v8's Inspector that's compatible with Istanbul's reporters. This tool is inspired from c8.
Like nyc, cov8 just magically works:
yarn global add v8-coverage
cov8 node foo.js
The above example will collect coverage for foo.js using v8's inspector.
Like the above example you just need to run this command to collect coverage:
cov8 <command>
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:
cov8 clear
Some options can be pass as parameter like:
./coverage by defaultYou can get more help with:
cov8 --help
Before running your application cov8 creates an inspector session in v8 and enables v8's built in coverage reporting.
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.
Copyright 2013 - present © cnpmjs.org | Home |