mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
saucelabs-unit-test.js: tweak failed tests message (#25836)
This commit is contained in:
parent
2c41b0aea6
commit
a93830c9fd
@ -58,6 +58,7 @@ const waitingCallback = (error, body, id) => {
|
||||
console.log(`Platform: ${test.platform.join(', ')}`)
|
||||
console.log(`Passed: ${passed.toString()}`)
|
||||
console.log(`URL: ${test.url}\n`)
|
||||
|
||||
if (errorStr) {
|
||||
console.error(errorStr)
|
||||
}
|
||||
@ -71,8 +72,8 @@ const waitingCallback = (error, body, id) => {
|
||||
if (jobsDone === browsersFile.length - 1) {
|
||||
jsUnitSaucelabs.stop()
|
||||
if (jobsDone > jobsSucceeded) {
|
||||
const failedTest = jobsDone - jobsSucceeded
|
||||
throw new Error(`Some test(s) failed (${failedTest})`)
|
||||
const failedTests = jobsDone - jobsSucceeded
|
||||
throw new Error(`${failedTests} test${failedTests > 1 ? 's' : ''} failed.`)
|
||||
}
|
||||
|
||||
console.log('All tests passed')
|
||||
|
Loading…
x
Reference in New Issue
Block a user