From 0e8885048d263fac7043efc088a3f36629bd92bd Mon Sep 17 00:00:00 2001 From: Lewis Sanchez Date: Fri, 12 Aug 2022 17:58:36 -0700 Subject: [PATCH] Adds ts files to coverage report using remapIstanbul --- tasks/covertasks.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tasks/covertasks.js b/tasks/covertasks.js index cd79ebb7..ae79eb84 100644 --- a/tasks/covertasks.js +++ b/tasks/covertasks.js @@ -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')); \ No newline at end of file +gulp.task('test:cover', gulp.series('cover:clean', 'cover:enableconfig', 'test', 'remap-istanbul')); \ No newline at end of file