travis-cov-forked
v0.2.5
Published
Mocha/blanket coverage reporter for travis-ci.
Downloads
2
Readme
This fork exists only to have an up-to-date version of Travis-Cov on NPM!
travis-cov
A coverage reporter for Mocha/Blanket that will fail a travis-ci build when the coverage threshold is too low.
Threshold is specified in the package.json file of the consuming project.
Add the key `"travis-cov" to the "config" key in your package.json file. Under that key you can add any of the following properties:
threshold: <number>,
global: <boolean>,
local: <boolean>
See Blanket.js's package.json as an example.
###usage
npm install travis-cov
- Use a reporter argument,
mocha -R travis-cov
- Change scripts.test in your package.json file to use
mocha -R travis-cov
- Add
travis-cov
to the package.json file in the config section. Add whichever keys you want (see above). - Set up your project with travis-ci
- Commit, if your tests pass and the code coverage is above the threshold the build will pass, otherwise it will fail.