I am using Mocha for testing my NodeJS application. I am not able to figure out how to use its code coverage feature. I tried googling it but did not find any proper tutoria
Blanket.js works perfect too.
npm install --save-dev blanket
in front of your test/tests.js
require('blanket')({ pattern: function (filename) { return !/node_modules/.test(filename); } });
run mocha -R html-cov > coverage.html
mocha -R html-cov > coverage.html