| OLD | NEW |
| (Empty) |
| 1 /** | |
| 2 * @license | |
| 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
| 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt | |
| 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt | |
| 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt | |
| 7 * Code distributed by Google as part of the polymer project is also | |
| 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt | |
| 9 */ | |
| 10 | |
| 11 var version = require('./package.json').version; | |
| 12 var ts = new Date().getTime(); | |
| 13 | |
| 14 module.exports = function(config) { | |
| 15 var auth; | |
| 16 | |
| 17 try { | |
| 18 auth = require('./test/auth/index'); | |
| 19 } catch(ex) { | |
| 20 auth = {}; | |
| 21 auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null; | |
| 22 auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null; | |
| 23 } | |
| 24 | |
| 25 if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return; | |
| 26 if (process.env.SKIP_SAUCE) return; | |
| 27 | |
| 28 var branch = process.env.TRAVIS_BRANCH || 'local' | |
| 29 var browserConfig = require('./sauce.browsers'); | |
| 30 var browsers = Object.keys(browserConfig); | |
| 31 var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ]; | |
| 32 var tunnel = process.env.TRAVIS_JOB_NUMBER || ts; | |
| 33 | |
| 34 if (process.env.TRAVIS_JOB_NUMBER) { | |
| 35 tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER); | |
| 36 } | |
| 37 | |
| 38 config.browsers = config.browsers.concat(browsers); | |
| 39 config.customLaunchers = browserConfig; | |
| 40 config.reporters.push('saucelabs'); | |
| 41 config.transports = [ 'xhr-polling' ]; | |
| 42 | |
| 43 config.sauceLabs = { | |
| 44 username: auth.SAUCE_USERNAME | |
| 45 , accessKey: auth.SAUCE_ACCESS_KEY | |
| 46 , startConnect: true | |
| 47 , tags: tags | |
| 48 , testName: 'ChaiJS' | |
| 49 , tunnelIdentifier: tunnel | |
| 50 }; | |
| 51 }; | |
| OLD | NEW |