-
Notifications
You must be signed in to change notification settings - Fork 19
/
karma.conf.js
105 lines (95 loc) · 2.19 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
process.env.CHROME_BIN = require("puppeteer").executablePath();
const sauceLabs = process.env.CI ? true : false;
const sauceLabsLaunchers = {
sl_win_chrome: {
base: "SauceLabs",
browserName: "chrome",
platform: "Windows 10"
},
sl_mac_chrome: {
base: "SauceLabs",
browserName: "chrome",
platform: "macOS 10.12"
},
sl_firefox: {
base: "SauceLabs",
browserName: "firefox",
platform: "Windows 10"
},
sl_mac_firfox: {
base: "SauceLabs",
browserName: "firefox",
platform: "macOS 10.12"
},
sl_safari: {
base: "SauceLabs",
browserName: "safari",
platform: "macOS 10.12"
},
sl_edge: {
base: "SauceLabs",
browserName: "MicrosoftEdge",
platform: "Windows 10"
},
sl_ie_11: {
base: "SauceLabs",
browserName: "internet explorer",
version: "11.103",
platform: "Windows 10"
},
sl_ie_10: {
base: "SauceLabs",
browserName: "internet explorer",
version: "10.0",
platform: "Windows 7"
},
sl_ios_safari_9: {
base: "SauceLabs",
browserName: "iphone",
version: "10.3"
},
"SL_ANDROID4.4": {
base: "SauceLabs",
browserName: "android",
platform: "Linux",
version: "4.4"
},
SL_ANDROID5: {
base: "SauceLabs",
browserName: "android",
platform: "Linux",
version: "5.1"
},
SL_ANDROID6: {
base: "SauceLabs",
browserName: "Chrome",
platform: "Android",
version: "6.0",
device: "Android Emulator"
}
};
module.exports = function(config) {
config.set({
concurrency: 5,
frameworks: ["jasmine", "karma-typescript"],
files: ["src/**/*.ts", "spec/**/*.ts"],
preprocessors: {
"src/**/*.ts": ["karma-typescript", "coverage"],
"spec/**/*.ts": "karma-typescript"
},
reporters: ["progress", "coverage", "karma-typescript", "notify"].concat(
sauceLabs ? "saucelabs" : []
),
customLaunchers: sauceLabs ? sauceLabsLaunchers : {},
browsers: sauceLabs ? Object.keys(sauceLabsLaunchers) : ["ChromeHeadless"],
coverageReporter: {
type: "lcov",
subdir: ".",
file: "lcov.info"
},
sauceLabs: {
build: process.env.SEMAPHORE_BUILD_NUMBER,
testName: "Karma tests"
}
});
};