mocha-with-coverage

0.0.2 • Public • Published

mocha-with-coverage

Run mocha tests with istanbul coverage but include non-tested files.

Istanbul does not have built-in support to show non-tested files (see this issue). gulp-istanbul provides this functionality, but setting this up in every project can become tedious.

This module helps you set this up quickly:

npm install --save-dev mocha-with-coverage
./node_modules/.bin/mocha-with-coverage \
  --istanbul.includeUntested \
  --mocha.require test/setup.js \
  --mocha.timeout 2500 \
  --sources src/**/*.js \
  --tests test/**/*.spec.js

Currently four reports are generated: json, lcovonly, html and cobertura in reports/coverage/json, reports/coverage/lcovonly, reports/coverage/html and reports/coverage/cobertura, respectively. If you need this to be configurable, please open an issue.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i mocha-with-coverage

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • pigulla