From 9a76e7a62cdcc56a06916bcdc709d8abf4019d93 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sat, 21 Nov 2015 09:33:29 -0600 Subject: [PATCH] chore(gulp): Add convience task for starting up a test server. --- tasks/gulp-tests.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index bbaf401bfe..c553fdcd3f 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -39,6 +39,13 @@ let testBin = (string) => { return `NODE_ENV=testing ./node_modules/.bin/${string}`; }; +gulp.task('test:nodemon', (done) => { + process.env.PORT = TEST_SERVER_PORT; + process.env.NODE_DB_URI=TEST_DB_URI; + + runSequence('nodemon') +}); + gulp.task('test:prepare:mongo', (cb) => { mongoose.connect(TEST_DB_URI, (err) => { if (err) return cb(`Unable to connect to mongo database. Are you sure it's running? \n\n${err}`);