gulp-istanbul-enforcer

Plugin for gulp that enforces coverage thresholds from Istanbul

MIT 5 个版本
安装
npm install gulp-istanbul-enforcer
yarn add gulp-istanbul-enforcer
pnpm add gulp-istanbul-enforcer
bun add gulp-istanbul-enforcer
README

gulp-istanbul-enforcer

Build Status

Plugin for gulp that enforces coverage thresholds from Istanbul.

Based on grunt-istanbul-coverage, which enforces istanbul coverage in grunt.

Installation

npm install --save-dev gulp-istanbul-enforcer

Example

Then, add it to your gulpfile.js:

var coverageEnforcer = require("gulp-istanbul-enforcer");

gulp.task('enforce-coverage', function () {
  var options = {
        thresholds : {
          statements : 100,
          branches : 100,
          lines : 100,
          functions : 100
        },
        coverageDirectory : 'coverage',
        rootDirectory : ''
      };
  return gulp
    .src('.')
    .pipe(coverageEnforcer(options));
});

Options

###thresholds Set the required percentage levels for each of the coverage measurements (statements, branches, lines, functions).

###coverageDirectory The directory that istanbul has outputted the coverage results to.

###rootDirectory The root directory of the project, in most cases this can be set to blank.

版本列表
1.0.3 2014-06-05
1.0.2 2014-01-28
1.0.1 2014-01-28
1.0.0 2014-01-28
0.0.1 2014-01-27