Unverified Commit a93830c9 authored by XhmikosR's avatar XhmikosR Committed by GitHub
Browse files

saucelabs-unit-test.js: tweak failed tests message (#25836)

parent 2c41b0ae
3 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!17021v4
Showing with 3 additions and 2 deletions
+3 -2
...@@ -58,6 +58,7 @@ const waitingCallback = (error, body, id) => { ...@@ -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) => { ...@@ -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')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment