Easily configure a npm module to generate and upload tests coverage statistics
to Coveralls.io. This module is focused for projects
mocha as test library, pull-requests to add support for other testing
libraries are welcome.
And of course, it's executed against itself! :-D
How to use
easy-coveralls in 5 steps
be sure your tests are passing on your CI server and that you has enabled your project on
easy-coverallsdependency to your project:npm install --save-dev easy-coveralls
add a script entry on your project
package.jsonfile for the test coverage:
configure your CI server to exec
TravisCIadd to your project
.travis.ymlfile:after_script:- npm run coveralls
npm run coverallsas a Post-Thread script.
How it works
First create an instrumented version of your module or library and swap it with
the original one. Later exec the tests as usual generating a
report in the case your tests works just by executing the
mocha command and
update the coverture statistics to
Coveralls.io, and finally delete the
instrumented library and restore your original one. No less, no more.