babel-plugin-transform-coverage
v0.1.5
Published
A plugin for Babel 6 that converts the source code to the code with coverage measurement for jscover
Downloads
28
Maintainers
Readme
Babel Coverage Plugin
This is a plugin for babel to convert the source codes to the codes with coverage measurement.
Using mocha and mocha-lcov-reporter to generate the LCOV report.
Usage
install mocha & mocha-lcov-reporter
$ npm install --save-dev mocha
$ npm install --save-dev mocha-lcov-reporter
install babel-cli babel-plugin-transform-coverage
$ npm install --save-dev babel-cli
$ npm install --save-dev babel-plugin-transform-coverage
compile source code with babel
$ babel src/ --plugins transform-coverage --out-dir app/
gen report with mocha-lcov-reporter
$ mocha test --reporter=mocha-lcov-reporter > test-cov/coverage.lcov
License
MIT