From 77bf90dff16afb31acc8d8fbd82884caf0d7bc80 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 14 May 2015 10:00:53 -0700 Subject: [PATCH] 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. --- gulpfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 0f310bf8ec..f281d6bf3a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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(); }