Skip to content

Commit

Permalink
Nest pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
bingenito committed Jul 9, 2019
1 parent 32ec2e3 commit e6ed162
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .gulp/tasks/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (gulp, config) {
}))

// Take js coverage json and remap to typescript. Output html and text
.on('finish', () => {
.on('end', () => {
return gulp.src(config.test.coverage.coverageFile)
.pipe(remap({
reports: {
Expand All @@ -38,21 +38,21 @@ module.exports = function (gulp, config) {
return gulp.src(config.test.coverage.coverageFile)
.pipe(replace(/\\\\build\\\\src/mg, '\\\\src')) // windows
.pipe(replace(/\/build\/src/mg, '/src')) // unix)
.pipe(gulp.dest(config.test.coverage.dest));
.pipe(gulp.dest(config.test.coverage.dest))

// Enforce statement coverage threshold based on config or if not defined 80%
.on('finish', function () {
return gulp.src('.')
.pipe(instanbulEnforcer({
coverageDirectory: config.test.coverage.dest,
rootDirectory: '',
thresholds: {
statements: config.test.coverage.threshold || 80
}
}));
});
})
})

// Enforce statement coverage threshold based on config or if not defined 80%
.on('finish', function () {
return gulp.src('.')
.pipe(instanbulEnforcer({
coverageDirectory: config.test.coverage.dest,
rootDirectory: '',
thresholds: {
statements: config.test.coverage.threshold || 80
}
}));
});
});
};
}
Expand Down

0 comments on commit e6ed162

Please sign in to comment.