Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Add saucelabs karma conf.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-roemer committed Apr 25, 2015
1 parent d73826f commit 32960b1
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 7 deletions.
7 changes: 0 additions & 7 deletions gulpfile.js
Expand Up @@ -123,13 +123,6 @@ gulp.task("jscs", function () {
// Use `node_modules` Phantom
process.env.PHANTOMJS_BIN = require("phantomjs").path;

// TODO[RYAN]: Hook up Sauce Labs for everything in browser matrix.
// https://github.com/FormidableLabs/full-stack-testing/issues/4
//
// SauceLabs tag.
// var SAUCE_BRANCH = process.env.TRAVIS_BRANCH || "local";
// var SAUCE_TAG = process.env.SAUCE_USERNAME + "@" + SAUCE_BRANCH;

// Karma coverage.
var KARMA_COV = {
reporters: ["spec", "coverage"],
Expand Down
62 changes: 62 additions & 0 deletions test/client/karma.conf.saucelabs.js
@@ -0,0 +1,62 @@
/**
* Karma Configuration: Base.
*/
var path = require("path");
var baseCfg = require("./karma.conf");

// Sauce labs environments.
var SAUCE_ENVS = {
"chrome-mac": {
base: "SauceLabs",
browserName: "chrome",
platform: "OS X 10.9"
},
"safari-mac": {
base: "SauceLabs",
browserName: "safari",
platform: "OS X 10.9"
},
"ie9-win7": {
base: "SauceLabs",
browserName: "internet explorer",
platform: "Windows 7",
version: "9"
},
"ie10-win7": {
base: "SauceLabs",
browserName: "internet explorer",
platform: "Windows 7",
version: "10"
},
"ie11-win7": {
base: "SauceLabs",
browserName: "internet explorer",
platform: "Windows 7",
version: "11"
}
};

// Optionally filter browsers from environment or "all browsers"
var BROWSERS = (process.env.BROWSERS || "").split(",")
.filter(function (x) { return x; }) || Object.keys(SAUCE_ENVS);

// SauceLabs tag.
var SAUCE_BRANCH = process.env.TRAVIS_BRANCH || "local";
var SAUCE_TAG = process.env.SAUCE_USERNAME + "@" + SAUCE_BRANCH;

module.exports = function(config) {
baseCfg(config);
config.set({
reporters: ["spec", "saucelabs"],
sauceLabs: {
testName: "full-stack-testing - Frontend Unit Tests",
tags: [SAUCE_TAG],
public: "public"
},
// Timeouts: Allow "n" minutes before saying "good enough". See also:
// https://github.com/angular/angular.js/blob/master/karma-shared.conf.js
captureTimeout: 0, // Pass through to SL.
customLaunchers: SAUCE_ENVS,
browsers: BROWSERS
});
};

0 comments on commit 32960b1

Please sign in to comment.