-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
65 lines (55 loc) · 1.53 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
'use strict';
const {customLaunchers} = require('./browsers.conf.js');
module.exports = config => {
config.set({
frameworks: ['jasmine'],
files: [
'./bin/test.min.js',
{
pattern: 'test-assets/**/*.*',
watched: false,
included: false,
served: true,
nocache: false
}
],
customLaunchers,
preprocessors: {
'./bin/test.min.js': ['sourcemap']
},
reporters: ['spec', 'saucelabs'],
specReporter: {
suppressErrorSummary: false,
suppressFailed: false,
suppressPassed: process.env.TRAVIS,
suppressSkipped: process.env.TRAVIS,
showSpecTiming: true,
failFast: false
},
sauceLabs: {
testName: 'clulib',
retryLimit: 2,
recordScreenshots: false,
options: {
'command-timeout': 600,
'idle-timeout': 600,
'max-duration': 5400
}
},
browserDisconnectTimeout: 10 * 1000, // 10s - default 2s
browserDisconnectTolerance: 1, // default 0
browserNoActivityTimeout: 4 * 60 * 1000, // 4 min - default 10s
captureTimeout: 5 * 60 * 1000, // 5 min default 60s
port: 9876,
autoWatch: false,
browsers: ['Chrome'],
singleRun: true,
concurrency: 5
});
if (process.env.TRAVIS) {
config.sauceLabs.build = `TRAVIS #${process.env.TRAVIS_BUILD_NUMBER} (${process.env.TRAVIS_BUILD_ID})`;
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
config.transports = ['polling'];
config.browsers = Object.keys(customLaunchers);
}
};