-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma-bs.config.js
59 lines (51 loc) · 1.43 KB
/
karma-bs.config.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
const originalConfigFn = require('./karma.conf.js');
let originalConfig;
originalConfigFn({ set: (config) => { originalConfig = config; } });
if (!process.env.BROWSER_STACK_USERNAME || !process.env.BROWSER_STACK_ACCESS_KEY) {
throw new Error(`
!!You have to set your Browserstack automate username and key!!
Login and go to https://www.browserstack.com/accounts/settings
then run in your console (or add it to your ~/.bashrc)
export BROWSER_STACK_USERNAME=[username];
export BROWSER_STACK_ACCESS_KEY=[key];
`);
}
module.exports = (config) => {
config.set({
...originalConfig,
browserStack: {
username: process.env.BROWSER_STACK_USERNAME,
accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
project: 'open-wc',
},
browsers: [
'bs_win10_chrome_69',
'bs_win10_firefox_62',
// 'bs_win10_ie_11',
],
// define browsers
customLaunchers: {
bs_win10_chrome_69: {
base: 'BrowserStack',
browser: 'Chrome',
browser_version: '69.0',
os: 'Windows',
os_version: '10',
},
bs_win10_firefox_62: {
base: 'BrowserStack',
browser: 'Firefox',
browser_version: '62.0',
os: 'Windows',
os_version: '10',
},
bs_win10_ie_11: {
base: 'BrowserStack',
browser: 'IE',
browser_version: '11.0',
os: 'Windows',
os_version: '10',
},
},
});
};