Skip to content

Commit 6b8b092

Browse files
committed
add non-zero return to test command
1 parent d707109 commit 6b8b092

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

gulpfile.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ var jscs = require('gulp-jscs');
1111
var jscs = require('gulp-jscs-custom');
1212
var isWin = /^win/.test(process.platform);
1313

14+
function handleError(err) {
15+
console.log(err.toString());
16+
this.emit('end');
17+
}
18+
1419
gulp.task('jsdoc', shell.task([
1520
(isWin) ?
1621
'"node_modules/.bin/jsdoc.cmd" -c ./doc-config.json' :
@@ -30,20 +35,21 @@ gulp.task('lint', function () {
3035

3136
gulp.task('pre-test', function () {
3237
return gulp.src(['./src/**/*.js'])
33-
// Covering files
38+
// Covering files
3439
.pipe(istanbul())
35-
// Force `require` to return covered files
40+
// Force `require` to return covered files
3641
.pipe(istanbul.hookRequire());
3742
});
38-
43+
3944
gulp.task('test', ['pre-test'], function () {
4045
return gulp.src('test/**/*.spec.js')
4146
.pipe(jasmine({
4247
reporter: new reporters.JUnitXmlReporter({
4348
savePath: 'test/reports'
4449
})
4550
}))
46-
// Creating the reports after tests ran
51+
.on("error", handleError)
52+
// Creating the reports after tests ran
4753
.pipe(istanbul.writeReports({
4854
dir: './test/reports/coverage',
4955
reporters: ['clover']

0 commit comments

Comments
 (0)