From 10cb1d651ab362aebc76a5b2c56023fe3ab3552f Mon Sep 17 00:00:00 2001 From: Kevin Gisi Date: Tue, 23 Jun 2015 21:33:05 -0400 Subject: [PATCH] Add gulp test:api:watch --- tasks/gulp-tests.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index f6ce872271..3445a7d48f 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -77,6 +77,17 @@ gulp.task('test:api', ['test:prepare:mongo'], (cb) => { pipe(runner); }); +gulp.task('test:api:clean', (cb) => { + pipe(exec(testBin("mocha test/api"), () => cb())); +}); + +gulp.task('test:api:watch', [ + 'test:prepare:mongo', + 'test:api:clean' +], () => { + gulp.watch(['website/src/**', 'test/api/**'], ['test:api:clean']); +}); + gulp.task('test:karma', ['test:prepare:build'], (cb) => { let runner = exec( testBin('karma start --single-run'),