-
Notifications
You must be signed in to change notification settings - Fork 138
/
karma.conf.js
71 lines (66 loc) · 1.57 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
const {
BROWSER = 'ChromeHeadlessNoSandbox',
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'
},
hostname: (BROWSER.includes('Android') ? '10.0.2.2' : 'localhost'),
reporters: ['mocha', 'coverage'],
port: 9876,
colors: true,
autoWatch: true,
browsers: [BROWSER],
singleRun: true,
concurrency: Infinity,
browserDisconnectTimeout: 800000,
browserDisconnectTolerance : 4,
browserNoActivityTimeout: 800000,
captureTimeout: 800000,
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
},
ChromeDebug: {
base: 'Chrome',
flags: ['--auto-open-devtools-for-tabs']
},
FirefoxDebug: {
base: 'Firefox',
flags: ['--devtools']
},
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 }));
}
require('@recurly/public-api-test-server');
runner.staticConfig = staticConfig;
module.exports = runner;