Merge pull request #582 from eordano/fix/gulpcover

WIP Fixes gulp coverage
This commit is contained in:
Manuel Aráoz 2014-11-26 12:54:14 -03:00
commit 4e5e8e1169
1 changed files with 8 additions and 4 deletions

View File

@ -56,15 +56,19 @@ gulp.task('watch:lint', function() {
}); });
gulp.task('coverage', function() { gulp.task('coverage', function() {
gulp.src(files) return gulp.src(files)
.pipe(istanbul()) .pipe(istanbul())
.pipe(tap(function(f) { .pipe(tap(function(f) {
// Make sure all files are loaded to get accurate coverage data // Make sure all files are loaded to get accurate coverage data
require(f.path); require(f.path);
})) }))
.on('end', testMocha.pipe( .on('end', function() {
istanbul.writeReports('coverage') gulp.src(tests)
)); .pipe(istanbul.writeReports('coverage'))
.pipe(new mocha({reporter: 'spec'}))
.on('end', function() {})
.on('error', ignoreError)
});
}); });
gulp.task('jsdoc', function() { gulp.task('jsdoc', function() {