Adds ts files to coverage report using remapIstanbul

This commit is contained in:
Lewis Sanchez 2022-08-12 17:58:36 -07:00
Родитель e4df164470
Коммит 0e8885048d
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -2,6 +2,7 @@ var gulp = require('gulp');
var del = require('del');
var jeditor = require("gulp-json-editor");
var istanbulReport = require('gulp-istanbul-report');
var remapIstanbul = require('remap-istanbul/lib/gulpRemapIstanbul');
gulp.task('cover:clean', function (done) {
return del('coverage', done);
@ -16,6 +17,15 @@ gulp.task('cover:enableconfig', () => {
.pipe(gulp.dest("./out", { 'overwrite': true }));
});
gulp.task('remap-istanbul', () => {
return gulp.src('./coverage/coverage.json')
.pipe(remapIstanbul({
reports: {
'json': './coverage/coverage.json',
}
}));
});
gulp.task('cover:enable', gulp.series('cover:clean', 'cover:enableconfig'));
gulp.task('cover:disable', () => {
@ -53,4 +63,4 @@ gulp.task('cover:combine-html', () => {
});
// for running on the ADO build system
gulp.task('test:cover', gulp.series('cover:clean', 'cover:enableconfig', 'test'));
gulp.task('test:cover', gulp.series('cover:clean', 'cover:enableconfig', 'test', 'remap-istanbul'));