mocha-remap-istanbul
v0.1.0
Published
Istanbul code coverage reporter for Mocha supporting coverage remapping by remap-istanbul
Downloads
1
Maintainers
Readme
mocha-remap-istanbul
Mocha reporter to generate coverage report of istanbul instrumented code. Supports coverage remapping by remap-istanbul. More than just inspired by mocha-istanbul, thanks guys.
Usage
- Install
mocha
andmocha-remap-istanbul
- Instrument your code using
istanbul
- Make your tests to use the instrumented code
- Run
mocha
usingmocha-istanbul
as a reporter - Use the environment variable
ISTANBUL_REPORTERS
to specify a comma separated list of istanbul reports with optional path. By defaultISTANBUL_REPORTERS=text-summary,html
- Use the environment variable
REMAP_ISTANBUL_REPORTERS
to specify a comma separated list of istanbul reports with optional path. To make this work you need to specify JSON reporter insideISTANBUL_REPORTERS
environment variable.
Example
process.env.ISTANBUL_REPORTERS = 'json=coverage/coverage.json';
process.env.REMAP_ISTANBUL_REPORTERS = 'text-summary,lcovonly=coverage/lcov.info,html=coverage/html';