From: Johann-S Date: Tue, 10 Oct 2017 09:50:55 +0000 (+0200) Subject: Add information about failed tests X-Git-Tag: v4.0.0-beta.2~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da22bce2f073d95689a474b294cd16db9ed41862;p=thirdparty%2Fbootstrap.git Add information about failed tests --- diff --git a/build/saucelabs-unit-test.js b/build/saucelabs-unit-test.js index 3ff7fcc40d..0b4a3b5f0e 100644 --- a/build/saucelabs-unit-test.js +++ b/build/saucelabs-unit-test.js @@ -70,7 +70,13 @@ const waitingCallback = (error, body, id) => { // Exit if (jobsDone === browsersFile.length - 1) { jsUnitSaucelabs.stop() - process.exit(jobsDone === jobsSucceeded ? 0 : 1) + if (jobsDone > jobsSucceeded) { + const failedTest = jobsDone - jobsSucceeded + throw new Error(`Some test(s) failed (${failedTest})`) + } + + console.log('All tests passed') + process.exit(0) } } }