-
Notifications
You must be signed in to change notification settings - Fork 4
/
karma.conf.ci.js
51 lines (49 loc) · 1.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
var karmaConfig = require('./karma.conf')
var customLaunchers = {
ChromeCustom: {
base: 'ChromeHeadless',
// We must disable the Chrome sandbox when running Chrome inside Docker (Chrome's sandbox needs
// more permissions than Docker allows by default)
flags: process.env.IS_CI ? ['--no-sandbox'] : []
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '68'
},
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: 'placement-engine' },
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
reporters: ['progress', 'saucelabs'],
coverageReporter: null
})
}