forked from formatjs/formatjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
66 lines (64 loc) · 1.71 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
// Look at //:BUILD to see why we're slicing 6
const FILES = process.argv.slice(6);
module.exports = function (config) {
// Browsers to run on Sauce Labs
// Check out https://saucelabs.com/platforms for all browser/OS combos
const customLaunchers = {
// Sauce Labs keeps failing to get a safari instance
// sl_safari: {
// base: 'SauceLabs',
// browserName: 'safari',
// },
sl_edge: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
},
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
version: '36', // https://polyfill.io/v3/supported-browsers/
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '40', // https://polyfill.io/v3/supported-browsers/
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11',
},
};
config.set({
basePath: '',
frameworks: ['jasmine', 'jasmine-matchers'],
files: FILES,
reporters: ['progress', 'saucelabs'],
port: 9876,
colors: true,
concurrency: 5,
sauceLabs: {
testName: 'formatjs',
build: process.env.TRAVIS_BUILD_ID,
recordScreenshots: false,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
// Must match with `.github/workflows/saucelabs.yml`
connectOptions: {
port: 5757,
logfile: 'sauce_connect.log',
},
public: 'public',
},
plugins: [
'karma-chrome-launcher',
'karma-jasmine-matchers',
'karma-jasmine',
'karma-sauce-launcher',
],
// Increase timeout in case connection in CI is slow
captureTimeout: 120000,
customLaunchers,
singleRun: true,
});
};