aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2017-09-29 11:23:27 +0200
committerXhmikosR <[email protected]>2017-09-29 19:39:25 +0300
commit874fd5b952b6e75f643fb3f8abb473f76c68ef77 (patch)
tree0dc7319e11b380a46423560cc6d61d359a319bc9
parent54d45072810f5cda4f3c75eba6d9acd70274a963 (diff)
downloadbootstrap-874fd5b952b6e75f643fb3f8abb473f76c68ef77.tar.xz
bootstrap-874fd5b952b6e75f643fb3f8abb473f76c68ef77.zip
Manage exceed maximum duration for our test
-rw-r--r--build/saucelabs-unit-test.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/build/saucelabs-unit-test.js b/build/saucelabs-unit-test.js
index 7607b6d94..09096b146 100644
--- a/build/saucelabs-unit-test.js
+++ b/build/saucelabs-unit-test.js
@@ -34,17 +34,25 @@ const waitingCallback = (error, body, id) => {
})
}, 2000)
} else {
- const test = body['js tests'][0]
- let passed = false
+ const test = body['js tests'][0]
+ let passed = false
+ let errorStr = false
if (test.result !== null) {
- passed = test.result.total === test.result.passed
+ if (typeof test.result === 'string' && test.result === 'Test exceeded maximum duration') {
+ errorStr = test.result
+ } else {
+ passed = test.result.total === test.result.passed
+ }
}
console.log(`Tested ${testURL}`)
console.log(`Platform: ${test.platform.join(',')}`)
console.log(`Passed: ${passed.toString()}`)
console.log(`Url ${test.url} \n`)
+ if (errorStr) {
+ console.error(errorStr)
+ }
if (passed) {
jobsSuccess++