gulp-blanket-mocha

Execute blanket coverage on Mocha tests

Gulp-Blanket-Mocha

npm install --save-dev gulp-blanket-mocha

gulp.task('test', function () {
    gulp.src(['tests/**/*.js'], { read: false })
        .pipe(blanket({
            instrument:['mime/mime.js'],
            captureFile: 'coverage.html',
            coverage : {
                reporter: 'html-cov'
            },
            test : {
                reporter: 'spec'
            }
        }));
});

Blanket patterns for the files to instrument. Required.

Output file for the coverage report. Required.

Your Mocha options for the coverage run

Your Mocha options for the test run

Does not work with gulp.watch - this is due to Mocha's resolve caching - don't know how to solve this, if you know, give me a shout