karma-coverage-incremental

1.1.18 • Public • Published

karma-coverage-incremental

npm version Build Status Coverage Status

A karma-coverage plugin for incremental coverage

Usage

npm install --save-dev karma-coverage-incremental

Karma (JSON support)

install karma-coverage

npm i -D karma-coverage

config 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

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.180latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.180
1.1.90
1.1.80
1.1.70
1.1.00
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i karma-coverage-incremental

Weekly Downloads

0

Version

1.1.18

License

MIT

Last publish

Collaborators

  • ronapelbaum