1.1.18 • Published 8 years ago
karma-coverage-incremental v1.1.18
karma-coverage-incremental
A karma-coverage plugin for incremental coverage
Usage
npm install --save-dev karma-coverage-incrementalKarma (JSON support)
install karma-coverage
npm i -D karma-coverageconfig karma-coverage
- Outsource threshold in a separate json file
- Use
json-summarycoverage-reporter
coverageReporter: {
check: {
global: require('./coverage.conf.json')
}
reporters: [
{type: 'json-summary'}
]
}add increment
Add increment to reporters:
reporters: ['coverage', 'increment']config increment
incrementConfig: {
flexibility: 0.5, //factor to reduce the roughness of the latest coverage results
coverageCheckPath: './coverage.conf.json' //path to coverage threshold json
}How does it work?
Takes the latest coverage report (from json-summary plugin) and smart-copies it to the coverage.conf.json file.
Node
(in progress...)
Istanbul (YAML support)
(in progress...)
Development
npm install
npm test
npm run lint
npm run lint-fix