Open aamin3189 opened 7 years ago
@aamin3189 great question! the easiest way to do this is to use an .istanbul.yml
file, do you already have one?
Thanks @nelsonic . After a little digging I have found that we can write a gulp task to generate coverage report for all the files,
var gulp = require('gulp');
var istanbul = require('gulp-istanbul');
gulp.task('test', function () {
return gulp.src(['./test/**/*.js'])
// Right there
.pipe(istanbul({includeUntested: true}))
.on('finish', function () {
gulp.src(['./test/**/*.js'])
.pipe(istanbul.writeReports({
dir: './coverage',
reporters: [ 'lcov' ],
reportOpts: { dir: './coverage'}
}));
});
});
@aamin3189 that should do the trick if you are already using gulp for your build tasks. 👍
How to cover all the files in the directory recursively