build(gulp): don't print stack from jasmine handler failures in ci mode

jasmine already logs all the test failures so that stack is redundant.
This commit is contained in:
Igor Minar 2015-05-14 10:00:53 -07:00
parent 8ad0205948
commit 77bf90dff1
1 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,11 @@ function runJasmineTests(globs, done) {
stdio: 'inherit'
}).on('close', function jasmineCloseHandler(exitCode) {
if (exitCode && treatTestErrorsAsFatal) {
done(new Error('Jasmine tests failed'));
var err = new Error('Jasmine tests failed');
// Mark the error for gulp similar to how gulp-utils.PluginError does it.
// The stack is not useful in this context.
err.showStack = false;
done(err);
} else {
done();
}