diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index a929214718..b729afea6d 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -293,6 +293,9 @@ gulp.task('test:api', ['test:startServer', 'test:prepare:mongo'], (done) => { }); mocha.run((numberOfFailures) => { + if (!process.env.RUN_INTEGRATION_TEST_FOREVER) { + process.exit(numberOfFailures); + } done(); }); });