forked from recurly/recurly-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
83 lines (78 loc) · 1.83 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const {
BROWSER = 'Chrome',
VIRTUALBOX_EDGE_UUID,
VIRTUALBOX_IE11_UUID,
ANDROID_HOME,
ANDROID_AVD_NAME
} = process.env;
const staticConfig = {
basePath: '',
frameworks: ['mocha', 'sinon', 'source-map-support'],
files: [
'build/recurly.js',
'build/test-unit.js'
],
proxies: {
'/api': 'http://localhost:9877'
},
preprocessors: {
'**/*.js': ['env']
},
envPreprocessor: ['SUITE_PARTITION'],
hostname: (BROWSER.includes('Android') ? '10.0.2.2' : 'localhost'),
reporters: ['mocha', 'coverage'],
port: 9876,
colors: true,
autoWatch: true,
browsers: [BROWSER || 'ChromeHeadless'],
singleRun: true,
concurrency: Infinity,
browserDisconnectTimeout: 800000,
browserDisconnectTolerance : 4,
browserNoActivityTimeout: 800000,
captureTimeout: 800000,
customLaunchers: {
ChromeDebug: {
base: 'Chrome',
flags: ['--auto-open-devtools-for-tabs']
},
FirefoxDebug: {
base: 'Firefox',
flags: ['--devtools']
},
VirtualBoxEdgeWin10: {
base: 'VirtualBoxEdge',
keepAlive: true,
uuid: VIRTUALBOX_EDGE_UUID
},
VirtualBoxIE11Win7: {
base: 'VirtualBoxIE11',
keepAlive: true,
uuid: VIRTUALBOX_IE11_UUID
},
Android10: {
base: 'AndroidEmulator',
avdName: ANDROID_AVD_NAME || 'Pixel_3_API_29',
sdkHome: ANDROID_HOME
}
},
client: {
captureConsole: true,
mocha: {
timeout: 7000 // 7 seconds
}
},
coverageReporter: {
dir : 'build/reports/',
reporters: [
// { type: 'html', subdir: 'coverage' }
{ type: 'lcovonly', subdir: 'coverage', file: 'lcov.info' }
]
}
};
function runner (config) {
config.set(Object.assign({}, staticConfig, { logLevel: config.LOG_INFO }));
}
const server = require('./test/server');
runner.staticConfig = staticConfig;
module.exports = runner;