]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add information about failed tests
authorJohann-S <johann.servoire@gmail.com>
Tue, 10 Oct 2017 09:50:55 +0000 (11:50 +0200)
committerJohann-S <johann.servoire@gmail.com>
Tue, 10 Oct 2017 10:58:41 +0000 (12:58 +0200)
build/saucelabs-unit-test.js

index 3ff7fcc40d27c460959c8704ed3106c764f73025..0b4a3b5f0eff42b6d942bde69346d4af10e6cbc6 100644 (file)
@@ -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)
       }
     }
   }