Skip to content

Commit

Permalink
upgrade karma; closes #2338 (#2339)
Browse files Browse the repository at this point in the history
- reorg `karma.conf.js` a little
- ensure local SauceLabs tests run
  • Loading branch information
boneskull authored Jun 29, 2016
1 parent aa8ff21 commit 96d9e06
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 47 deletions.
94 changes: 48 additions & 46 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,5 @@
'use strict';

function addSauceTests(cfg) {
cfg.reporters.push('saucelabs');
cfg.customLaunchers = {
ie8: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8.0'
},
chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 8',
version: 'latest'
},
edge: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: 'latest'
},
firefox: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 8.1',
version: 'latest'
},
safari: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: 'latest'
}
};

cfg.browsers = cfg.browsers.concat(Object.keys(cfg.customLaunchers));

cfg.sauceLabs = {
public: 'public'
};

// for slow browser booting, ostensibly
cfg.captureTimeout = 120000;
}

module.exports = function(config) {
var cfg = {
frameworks: [
Expand Down Expand Up @@ -96,7 +51,6 @@ module.exports = function(config) {
cfg.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER
+ ' (' + process.env.TRAVIS_BUILD_ID + ')';
cfg.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
cfg.sauceLabs.startConnect = true;
}
} else {
if (!(process.env.SAUCE_USERNAME || process.env.SAUCE_ACCESS_KEY)) {
Expand Down Expand Up @@ -129,3 +83,51 @@ module.exports = function(config) {

config.set(cfg);
};

function addSauceTests(cfg) {
cfg.reporters.push('saucelabs');

cfg.customLaunchers = {
ie8: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8.0'
},
chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 8',
version: 'latest'
},
edge: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: 'latest'
},
firefox: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 8.1',
version: 'latest'
},
safari: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: 'latest'
}
};

cfg.browsers = cfg.browsers.concat(Object.keys(cfg.customLaunchers));

cfg.sauceLabs = {
public: 'public',
startConnect: true
};

// for slow browser booting, ostensibly
cfg.captureTimeout = 120000;
cfg.browserNoActivityTimeout = 20000;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
"coffee-script": "~1.8.0",
"eslint": "^1.2.1",
"expect.js": "^0.3.1",
"karma": "^0.13.22",
"karma": "^1.1.0",
"karma-browserify": "^5.0.5",
"karma-expect": "^1.1.2",
"karma-no-mocha": "^2.0.0",
Expand Down

0 comments on commit 96d9e06

Please sign in to comment.