forked from amplitude/Amplitude-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
54 lines (53 loc) · 1.38 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
module.exports = function(config) {
const customLaunchers = {
sauce_ie_8: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8'
},
sauce_ie9: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9.0'
},
sauce_edge: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
},
sauce_chrome_windows: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10',
},
sauce_safari_sierra: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'macOS 10.12',
},
};
config.set({
sauceLabs: {
testName: 'Amplitude JavaScript SDK',
},
preprocessors: {
'**/*.js': ['sourcemap']
},
frameworks: ['mocha', 'chai', 'sinon'],
files: ['amplitude-snippet.min.js', 'build/snippet-tests.js', 'build/tests.js'],
reporters: ['mocha', 'saucelabs'],
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
customLaunchers,
captureTimeout: 120000,
browsers: ['ChromeHeadless'],
// browsers: ['sauce_chrome_windows', 'sauce_edge', 'sauce_safari_sierra'],
autoWatch: false,
singleRun: true,
// singleRun: false, // Karma captures browsers, runs the tests and exits
concurrency: 4,
})
}