From 2ab42595e414222faced68f6d4a25352ef44da43 Mon Sep 17 00:00:00 2001 From: Esteban Ordano Date: Wed, 26 Nov 2014 12:51:02 -0300 Subject: [PATCH] Fixes gulp coverage --- gulpfile.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 066c253..c66ee7f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -56,15 +56,19 @@ gulp.task('watch:lint', function() { }); gulp.task('coverage', function() { - gulp.src(files) + return gulp.src(files) .pipe(istanbul()) .pipe(tap(function(f) { // Make sure all files are loaded to get accurate coverage data require(f.path); })) - .on('end', testMocha.pipe( - istanbul.writeReports('coverage') - )); + .on('end', function() { + gulp.src(tests) + .pipe(istanbul.writeReports('coverage')) + .pipe(new mocha({reporter: 'spec'})) + .on('end', function() {}) + .on('error', ignoreError) + }); }); gulp.task('jsdoc', function() {