diff options
author | XhmikosR <xhmikosr@gmail.com> | 2017-10-08 17:48:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 17:48:37 +0300 |
commit | 5e7a9afe35c2685d88bdb4a94c6718ac758f79b0 (patch) | |
tree | 5e8e77dc316a7bc0fc512065ffe5352779014dda /build | |
parent | ef38ca1c11c63d8e962af4706e4d182e24468cee (diff) |
Update saucelabs-unit-test.js (#24297)
Add license header and minor formatting tweaks.
Diffstat (limited to 'build')
-rw-r--r-- | build/saucelabs-unit-test.js | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/build/saucelabs-unit-test.js b/build/saucelabs-unit-test.js index cfc4ed2745..3ff7fcc40d 100644 --- a/build/saucelabs-unit-test.js +++ b/build/saucelabs-unit-test.js @@ -1,23 +1,32 @@ +/*! + * Script to run our Sauce Labs tests. + * Copyright 2017 The Bootstrap Authors + * Copyright 2017 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/* +Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator +Mac Opera is not currently supported by Sauce Labs +Win Opera 15+ is not currently supported by Sauce Labs +iOS Chrome is not currently supported by Sauce Labs +*/ + 'use strict' const path = require('path') const JSUnitSaucelabs = require('jsunitsaucelabs') -// Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator -// Mac Opera is not currently supported by Sauce Labs -// Win Opera 15+ is not currently supported by Sauce Labs -// iOS Chrome is not currently supported by Sauce Labs - const jsUnitSaucelabs = new JSUnitSaucelabs({ username: process.env.SAUCE_USERNAME, password: process.env.SAUCE_ACCESS_KEY, - build: process.env.TRAVIS_JOB_ID + build: process.env.TRAVIS_JOB_ID }) -const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed' +const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed' const browsersFile = require(path.resolve(__dirname, './sauce_browsers.json')) -let jobsDone = 0 -let jobsSucceeded = 0 +let jobsDone = 0 +let jobsSucceeded = 0 const waitingCallback = (error, body, id) => { if (error) { @@ -33,8 +42,8 @@ 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) { @@ -46,9 +55,9 @@ const waitingCallback = (error, body, id) => { } console.log(`Tested ${testURL}`) - console.log(`Platform: ${test.platform.join(',')}`) + console.log(`Platform: ${test.platform.join(', ')}`) console.log(`Passed: ${passed.toString()}`) - console.log(`Url ${test.url} \n`) + console.log(`URL: ${test.url}\n`) if (errorStr) { console.error(errorStr) } |