-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf-ci.js
66 lines (62 loc) · 1.56 KB
/
karma.conf-ci.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
var fs = require("fs");
module.exports = function(config) {
// Use ENV vars on Travis and sauce.json locally to get credentials
if (! process.env.SAUCE_USERNAME) {
if (! fs.existsSync("sauce.json")) {
console.log("Create a sauce.json with your credentials.");
process.exit(1);
} else {
process.env.SAUCE_USERNAME = require("./sauce").username;
process.env.SAUCE_ACCESS_KEY = require("./sauce").accessKey;
}
}
// Check out https://saucelabs.com/platforms for all browser/platform combos
var customLaunchers = {
"SL_Chrome": {
base: "SauceLabs",
browserName: "chrome",
platform: "Linux"
},
"SL_IE": {
base: "SauceLabs",
browserName: "internet explorer"
},
"SL_Firefox": {
base: "SauceLabs",
browserName: "firefox"
},
"SL_android": {
base: "SauceLabs",
browserName: "android"
},
"SL_safari": {
base: "SauceLabs",
browserName: "safari",
platform: "OS X 10.10"
},
"SL_opera": {
base: "SauceLabs",
browserName: "Opera",
platform: "Linux"
}
};
config.set({
basePath: "",
frameworks: ["jasmine"],
files: [
"src/js/source.js",
"test/unit/**/*.spec.js"
],
reporters: ["dots", "saucelabs"],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
sauceLabs: {
testName: "Cloudflare integration for Piwik unit tests"
},
captureTimeout: 240000,
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
singleRun: true
});
};