This reporter is a simple code coverage reporter.
Will display the results in a list.
npm install mocha-tcov-reporter --save-dev
Add a set of blanket to package.json.
"config": {
"blanket": {
"pattern": "/lib/",
"data-cover-never": "/node_modules/"
}
}
After that, You need to specify the reporter.
mocha -r blanket -R mocha-tcov-reporter test
With mocha-multi, you can view the report along with the test results.
In the example below, we have used in conjunction with the spec reporter.
multi='spec=- mocha-tcov-reporter=-' mocha -r blanket -R mocha-multi test