forked from hotwired/stimulus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
117 lines (104 loc) · 2.13 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
const config = {
browsers: ["ChromeHeadless"],
frameworks: ["qunit"],
reporters: ["progress"],
singleRun: true,
autoWatch: false,
files: [
{ pattern: "packages/*/**/test/index.ts" }
],
preprocessors: {
"packages/**/*.ts": ["webpack"]
},
mime: {
"text/x-typescript": ["ts"]
},
webpack: {
module: {
rules: [
{
test: /\.ts$/,
use: [
{ loader: "ts-loader" }
]
}
]
},
resolve: {
extensions: [".ts", ".js"]
}
},
client: {
clearContext: false,
qunit: {
showUI: true
}
},
captureTimeout: 180000,
browserDisconnectTimeout: 180000,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 300000
}
if (process.env.CI) {
config.customLaunchers = {
sl_chrome: {
base: "SauceLabs",
browserName: "chrome",
version: "63"
},
sl_chrome_lang_tl: {
base: "SauceLabs",
browserName: "chrome",
version: "63",
chromeOptions: {
args: ["--lang=tr"]
}
},
sl_firefox_43: {
base: "SauceLabs",
browserName: "firefox",
version: "43"
},
sl_firefox: {
base: "SauceLabs",
browserName: "firefox",
version: "57"
},
sl_safari_9: {
base: "SauceLabs",
browserName: "safari",
platform: "OS X 10.11",
version: "9"
},
sl_safari_10_1: {
base: "SauceLabs",
browserName: "safari",
platform: "macOS 10.12",
version: "10.1"
},
sl_safari_11: {
base: "SauceLabs",
browserName: "safari",
platform: "macOS 10.13",
version: "11"
},
sl_edge: {
base: "SauceLabs",
browserName: "microsoftedge",
platform: "Windows 10",
version: "15.15063"
},
sl_ie: {
base: "SauceLabs",
browserName: "internet explorer",
platform: "Windows 8.1",
version: "11"
}
}
config.browsers = Object.keys(config.customLaunchers)
config.sauceLabs = { testName: "Stimulus Browser Tests" }
config.reporters = ["dots", "saucelabs"]
}
module.exports = function(karmaConfig) {
karmaConfig.set(config)
}