check-coverage-summary
v0.0.2
Published
checking the coverage percentage from coverage-summary.json
Downloads
5
Maintainers
Readme
check-coverage-summary
checking the coverage percentage from coverage-summary.json generated by reporter
json-summary
Install
npm i check-coverage-summary -D
Usage with Cli
use with default config:
- default coverage file: coverage/coverage-summary.json
- lines, statements, functions and branches all default minimum check is 80
npx check-coverage-summary
or set config in args:
npx check-coverage-summary --lines 80 --statements 80 --functions 80 --branches 80
Usage with gitHooks
"check-coverage-summary": {
"lines": 80,
"statements": 80,
"functions": 80,
"branches": 80
},
"gitHooks": {
"pre-push": "npm run test && check-coverage-summary"
}