Coverage

Code Coverage

You may use pre-exiting industry standard tools like nyc and c8 to collect the code coverage metrics from your tests.

Following are the examples of using both c8 and nyc with Japa. Also, make sure to consult the documentation of respective tools for advanced usage.

Using c8

npm i -D c8
{
"scripts": {
"test": "c8 node bin/test.js"
}
}
npm test

Using nyc

npm i -D nyc
{
"scripts": {
"test": "nyc node bin/test.js"
}
}
npm test