grunt-mocha-cov-threshold

0.1.6 • Public • Published

grunt-mocha-cov-threshold

Report and fail build on mocha json-cov thresholds

Installation

$ npm install grunt-mocha-cov-threshold --save-dev

Usage

This task depends on the mocha json-cov reporter having been run first. That reporter outputs a json file which we can use to insure coverage thresholds have been met.

These are the defaults within the task.

grunt.initConfig({
  mochacov: {
    json: {
      options: {
        // this outputs the json file to coverage.json
        reporter: 'grunt-mocha-cov-threshold'
      }
    }
  },
  mocha_cov_threshold: {
    options: {
      coverage: 60 // percentage threshold
      jsonPath: 'coverage.json'
    },
    ci: {}
  }
});

Readme

Keywords

Package Sidebar

Install

npm i grunt-mocha-cov-threshold

Weekly Downloads

2

Version

0.1.6

License

MIT

Last publish

Collaborators

  • davetayls