-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.ci.js
104 lines (92 loc) · 2.22 KB
/
karma.conf.ci.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
/* eslint-env node */
'use strict';
var baseConfig = require('./karma.conf');
var customLaunchers = {
sl_chrome_latest: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'linux',
version: 'latest'
},
sl_chrome_latest_1: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'linux',
version: 'latest-1'
},
sl_firefox_latest: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'linux',
version: 'latest'
},
sl_firefox_latest_1: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'linux',
version: 'latest-1'
},
sl_safari_9: {
base: 'SauceLabs',
browserName: 'safari',
version: '9.0'
},
// FIXME(ndhoule): Bad IE7/8 support in testing packages make these fail
// sl_ie_7: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// version: '7'
// },
// sl_ie_8: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// version: '8'
// },
// FIXME(): IE9 tests are failing pre-Browserification
// sl_ie_9: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// version: '9'
// },
sl_ie_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '10'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11'
},
sl_edge_latest: {
base: 'SauceLabs',
browserName: 'microsoftedge'
}
};
module.exports = function(config) {
baseConfig(config);
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
throw new Error('SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are required but are missing');
}
config.set({
browserDisconnectTolerance: 2,
browserDisconnectTimeout: 30000,
browserNoActivityTimeout: 30000,
singleRun: true,
reporters: ['progress', 'junit', 'coverage'],
browsers: ['PhantomJS'].concat(Object.keys(customLaunchers)),
customLaunchers: customLaunchers,
junitReporter: {
outputDir: process.env.TEST_REPORTS_DIR,
suite: require('./package.json').name
},
sauceLabs: {
testName: require('./package.json').name
},
coverageReporter: {
reporters: [
{ type: 'lcov' }
]
}
});
};