Skip to content

Commit

Permalink
Add information about failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Oct 10, 2017
1 parent 64c944b commit da22bce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/saucelabs-unit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit da22bce

Please sign in to comment.