From 03d26e39c71d82e2b2a1acacbb200adcb3accd26 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 3 May 2017 10:06:19 -0700 Subject: [PATCH] Force failing mocha tests to return a exit code of 1 Fixes #651 --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index feaa3dcf..1f92e537 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -83,6 +83,7 @@ gulp.task('instrument-test', function () { gulp.task('mocha', ['instrument-test'], function () { return gulp.src([`${outDir}/*test.js`, `${outDir}/**/*test.js`], {read: false}) .pipe(mocha()) + .once('error', () => process.exit(1)) .pipe(istanbul.writeReports()); });