A karma-coverage plugin for incremental coverage
npm install --save-dev karma-coverage-incremental
npm i -D karma-coverage
- Outsource threshold in a separate json file
- Use
json-summary
coverage-reporter
coverageReporter: {
check: {
global: require('./coverage.conf.json')
}
reporters: [
{type: 'json-summary'}
]
}
Add increment
to reporters:
reporters: ['coverage', 'increment']
incrementConfig: {
flexibility: 0.5, //factor to reduce the roughness of the latest coverage results
coverageCheckPath: './coverage.conf.json' //path to coverage threshold json
}
Takes the latest coverage report (from json-summary
plugin) and smart-copies it to the coverage.conf.json
file.
(in progress...)
(in progress...)
npm install
npm test
npm run lint
npm run lint-fix