From 7fe2a19bc5aa32434df09d86030b2636e516e6b1 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sun, 25 Oct 2015 09:54:09 -0500 Subject: [PATCH] Adjust start server task to use nodemon to recover from syntax errors --- package.json | 1 + tasks/gulp-tests.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index aadceeb2fd..4e1eca98a1 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "mocha": "^2.3.3", "mongodb": "^2.0.46", "mongoskin": "~0.6.1", + "nodemon": "^1.8.0", "protractor": "~2.0.0", "rewire": "^2.3.3", "shelljs": "^0.4.0", diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index bd7877c1d6..da86b1c113 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -47,7 +47,7 @@ gulp.task('test:prepare:mongo', (cb) => { gulp.task('test:prepare:server', ['test:prepare:mongo'], () => { if (!server) { - server = exec(`NODE_DB_URI="${TEST_DB_URI}" PORT="${TEST_SERVER_PORT}" node ./website/src/server.js`); + server = exec(`NODE_DB_URI="${TEST_DB_URI}" PORT="${TEST_SERVER_PORT}" ./node_modules/.bin/nodemon ./website/src/server.js`); } }); @@ -312,7 +312,7 @@ gulp.task('test:api', ['test:prepare:server'], (done) => { }); }); -gulp.task('test:api:watch', () => { +gulp.task('test:api:watch', ['test:prepare:server'], () => { process.env.RUN_INTEGRATION_TEST_FOREVER = true; gulp.watch(['website/src/**', 'test/api/**'], ['test:api']); });