How to use the gulp-istanbul.enforceThresholds function in gulp-istanbul

To help you get started, we’ve selected a few gulp-istanbul examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mlucool / gulp-jsdoc3 / gulpfile.js View on Github external
gulp.task('test', ['pre-test'], function () {
    // Everything file loaded from here uses babel with .babelrc
    require('babel-core/register'); // https://babeljs.io/docs/usage/require/

    return gulp.src(specs, {read: false})
        .pipe(mocha())
        .pipe(istanbul.writeReports())
        // Enforce a coverage of at least 90%
        .pipe(istanbul.enforceThresholds({thresholds: {global: 75}}));
});
github ukayani / restify-router / gulpfile.js View on Github external
.on('finish', function () {
      return gulp.src(testSourceFiles)
        .pipe(mocha())
        .on('error', gutil.log)
        .pipe(istanbul.writeReports()) // Creating the reports after tests ran
        .pipe(istanbul.enforceThresholds({thresholds: {global: 95}})) // Enforce a coverage of at least 100%
        .on('end', done);

    })
    .on('error', gutil.log);
github jquatier / eureka-js-client / gulpfile.js View on Github external
.on('finish', function () {
      gulp.src(['test/**/*.js'])
        .pipe(mocha())
        .pipe(istanbul.writeReports())
        .pipe(istanbul.enforceThresholds({ thresholds: { global: 0 } }))
        .pipe(envs.reset)
        .on('end', cb);
    });
});
github vicanso / koa-log / gulpfile.js View on Github external
.on('finish', function() {
			gulp.src(['./test/*.js'])
				.pipe(mocha({
					reporter: 'spec'
				}))
				.pipe(istanbul.writeReports({
					reporters: ['text', 'text-summary', 'html']
				}))
				.pipe(istanbul.enforceThresholds({
					thresholds: {
						global: 80
					}
				})).on('end', cb);
		});
});
github hwndept / node-seed / gulpfile.js View on Github external
.on('finish', function () {
      gulp.src(TEST_CASE_FILES)
        .pipe(mocha({compilers: {js: babelRegister}}))
        .pipe(istanbul.writeReports({
          dir: BUILD_COVERAGE_REPORT_DIR
        }))
        .pipe(istanbul.enforceThresholds({
          thresholds: {
            global: 100
          }
        }))
        .on('finish', done);
    });
});

gulp-istanbul

Istanbul unit test coverage plugin for gulp.

MIT
Latest version published 7 years ago

Package Health Score

47 / 100
Full package analysis