From: Evert Timberg Date: Sun, 23 Aug 2015 19:55:10 +0000 (-0400) Subject: Watch mode runs tests. X-Git-Tag: 2.0.0-alpha4~39^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f636a7897712e5c4ee59e785c4f9793b6cce9513;p=thirdparty%2FChart.js.git Watch mode runs tests. --- diff --git a/gulpfile.js b/gulpfile.js index d7dda48bf..560c6b496 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -107,11 +107,8 @@ gulp.task('unittest', function() { return gulp.src(files) .pipe(karma({ configFile: 'karma.conf.js', - action: 'run' - })) - .on('error', function(err) { - throw err; - }); + action: 'watch' + })); }); gulp.task('library-size', function() { @@ -133,7 +130,7 @@ gulp.task('module-sizes', function() { }); gulp.task('watch', function() { - gulp.watch('./src/**', ['build']); + gulp.watch('./src/**', ['build', 'unittest']); }); gulp.task('test', ['jshint', 'valid']); diff --git a/karma.conf.js b/karma.conf.js index a0d60308f..cbf72b381 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,9 +1,7 @@ module.exports = function(config) { config.set({ - autoWatch: false, browsers: ['Chrome', 'Firefox'], frameworks: ['jasmine'], reporters: ['progress'], - singleRun: false }); }; \ No newline at end of file