This package has been deprecated

Author message:

This tool was built when [c8](https://github.com/bcoe/c8) package wasn't ready to be used, c8 has now more functionality and works better that this module. So you should really use c8.

v8-coverage

1.0.9 • Public • Published

cov8 - Native V8 coverage tool

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.

How to use

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

Options

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), ./coverage by default
  • forks use this option if you want to collect coverage from forked process

You can get more help with:

cov8 --help

How it Works

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i v8-coverage

Weekly Downloads

2,962

Version

1.0.9

License

ISC

Unpacked Size

43.6 kB

Total Files

7

Last publish

Collaborators

  • eywek