mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
saucelabs-unit-test.js: tweak failed tests message (#25836)
This commit is contained in:
parent
2c41b0aea6
commit
a93830c9fd
1 changed files with 3 additions and 2 deletions
|
@ -58,6 +58,7 @@ const waitingCallback = (error, body, id) => {
|
||||||
console.log(`Platform: ${test.platform.join(', ')}`)
|
console.log(`Platform: ${test.platform.join(', ')}`)
|
||||||
console.log(`Passed: ${passed.toString()}`)
|
console.log(`Passed: ${passed.toString()}`)
|
||||||
console.log(`URL: ${test.url}\n`)
|
console.log(`URL: ${test.url}\n`)
|
||||||
|
|
||||||
if (errorStr) {
|
if (errorStr) {
|
||||||
console.error(errorStr)
|
console.error(errorStr)
|
||||||
}
|
}
|
||||||
|
@ -71,8 +72,8 @@ const waitingCallback = (error, body, id) => {
|
||||||
if (jobsDone === browsersFile.length - 1) {
|
if (jobsDone === browsersFile.length - 1) {
|
||||||
jsUnitSaucelabs.stop()
|
jsUnitSaucelabs.stop()
|
||||||
if (jobsDone > jobsSucceeded) {
|
if (jobsDone > jobsSucceeded) {
|
||||||
const failedTest = jobsDone - jobsSucceeded
|
const failedTests = jobsDone - jobsSucceeded
|
||||||
throw new Error(`Some test(s) failed (${failedTest})`)
|
throw new Error(`${failedTests} test${failedTests > 1 ? 's' : ''} failed.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('All tests passed')
|
console.log('All tests passed')
|
||||||
|
|
Loading…
Add table
Reference in a new issue