-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.ci.js
50 lines (48 loc) · 1.08 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
const { name } = require('./package.json')
const karmaConfig = require('./karma.conf')
const customLaunchers = {
ChromeCustom: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: 'latest'
},
sl_ios_safari_10: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: '10.0'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
sl_android: {
base: 'SauceLabs',
browserName: 'Browser',
platform: 'Android',
version: '6.0',
deviceName: 'Android Emulator'
}
}
module.exports = function (config) {
karmaConfig({
set: function setter (baseConfig) {
config.set(sauceConfig(baseConfig))
}
})
}
function sauceConfig (baseConfig) {
return Object.assign({}, baseConfig, {
sauceLabs: { testName: name },
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
reporters: ['progress', 'saucelabs'],
coverageReporter: null
})
}