From 7f6b39251100e585668ae850c609b4d947262874 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sat, 17 Oct 2015 19:17:23 -0500 Subject: [PATCH] Add gulp watch task for api tests --- tasks/gulp-tests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index fded5009b1..fc03660248 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -301,12 +301,18 @@ gulp.task('test:api', ['test:prepare:mongo'], (done) => { mocha.run((numberOfFailures) => { if (!process.env.RUN_INTEGRATION_TEST_FOREVER) { kill(server); + process.exit(numberOfFailures); } done(); }); }); }); +gulp.task('test:api:watch', () => { + process.env.RUN_INTEGRATION_TEST_FOREVER = true; + gulp.watch(['website/src/**', 'test/api/**'], ['test:api']); +}); + gulp.task('test:api:safe', ['test:prepare:mongo'], (done) => { let server = exec(`NODE_DB_URI="${TEST_DB_URI}" PORT="${API_TEST_SERVER_PORT}" node ./website/src/server.js`);