-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkarma.conf.js
128 lines (118 loc) · 2.83 KB
/
karma.conf.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// @see https://wiki.saucelabs.com/display/DOCS/Platform+Configurator/
const customLaunchers = {
// disabled, as ios tests proved to be unreliable
// sl_iphone_6s: {
// base: "SauceLabs",
// browserName: "Safari",
// platform: "iOS",
// deviceName: "iPhone 6s Simulator",
// deviceOrientation: "portrait",
// platformVersion: "10.0"
// },
// sl_iphone_x: {
// base: "SauceLabs",
// browserName: "Safari",
// platform: "iOS",
// deviceName: "iPhone XS Simulator",
// deviceOrientation: "portrait",
// platformVersion: "12.0"
// },
sl_android_4_4: {
base: "SauceLabs",
browserName: "Chrome",
platform: "Android",
version: "4.4",
deviceName: "Android Emulator",
deviceOrientation: "portrait"
},
sl_android_6: {
base: "SauceLabs",
browserName: "Chrome",
platform: "Android",
version: "6.0",
deviceName: "Android Emulator",
deviceOrientation: "portrait"
},
sl_chrome_35: {
base: "SauceLabs",
browserName: "Chrome",
platform: "Windows 7",
version: "35"
},
sl_chrome_70: {
base: "SauceLabs",
browserName: "Chrome",
platform: "Windows 10",
version: "70"
},
// Testing the oldest edge version
sl_edge_13: {
base: "SauceLabs",
browserName: "MicrosoftEdge",
platform: "Windows 10",
version: "13"
},
sl_ie_11: {
base: "SauceLabs",
browserName: "Internet Explorer",
platform: "Windows 10",
version: "11"
},
sl_ie_10: {
base: "SauceLabs",
browserName: "Internet Explorer",
platform: "Windows 7",
version: "10"
},
sl_ff_30: {
base: "SauceLabs",
browserName: "Firefox",
platform: "Windows 10",
version: "30"
},
sl_ff_64: {
base: "SauceLabs",
browserName: "Firefox",
platform: "Windows 10",
version: "64"
}
};
module.exports = function(config) {
const chrome = process.env.KARMA_CHROME === "true";
const firefox = process.env.KARMA_FIREFOX === "true";
const ci = process.env.CI === "true";
const browsers = [];
if (ci) {
browsers.push(...Object.keys(customLaunchers));
} else if (chrome) {
browsers.push("Chrome");
} else if (firefox) {
browsers.push("Firefox");
} else {
browsers.push("ChromeHeadless");
}
config.set({
basePath: ".",
frameworks: ["jasmine"],
files: ["tests/dist/index.js"],
autoWatch: true,
browsers,
reporters: ci ? ["spec", "saucelabs"] : ["spec"],
singleRun: true,
// Max concurrency for SauceLabs OS plan
concurrency: 5,
customLaunchers,
sauceLabs: {
testName: "@zeecoder/container-query",
public: "public"
},
client: {
jasmine: {
// Order of the tests matter, so don't randomise it
random: false
}
},
// SauceLabs takes some time to connect to mobile devices
captureTimeout: 120000
});
};