From f43a5986daf16d84f71791b5953869e767e35e65 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 15 May 2017 17:55:48 -0700 Subject: [PATCH] Increase unit-tests timeout, improve error display, add set -e FREEBIE --- Gruntfile.js | 6 +++--- travis.sh | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 94bfd3313..c818e3425 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -369,7 +369,7 @@ module.exports = function(grunt) { return app.client.execute(getMochaResults).then(function(data) { return Boolean(data.value); }); - }, 5000, 'Expected to find window.mochaResults set!'); + }, 10000, 'Expected to find window.mochaResults set!'); }).then(function() { return app.client.execute(getMochaResults); }).then(function(data) { @@ -384,7 +384,7 @@ module.exports = function(grunt) { } }).catch(function (error) { failure = function() { - grunt.fail.fatal('Something went wrong: ' + error.stack); + grunt.fail.fatal('Something went wrong: ' + error.message + ' ' + error.stack); }; }).then(function () { // We need to use the failure variable and this early stop to clean up before @@ -397,7 +397,7 @@ module.exports = function(grunt) { } done(); }).catch(function (error) { - console.error('Second-level error:', error.stack); + console.error('Second-level error:', error.message, error.stack); if (failure) { failure(); } diff --git a/travis.sh b/travis.sh index e76a92016..37182da47 100755 --- a/travis.sh +++ b/travis.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash +set -e + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0 sh -e /etc/init.d/xvfb start sleep 3 fi + grunt test + grunt test-release:$TRAVIS_OS_NAME