This repository has been archived by the owner on May 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.config.js
58 lines (57 loc) · 1.5 KB
/
karma.config.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
process.env.CHROME_BIN = process.env.CHROME_BIN || require('puppeteer').executablePath()
module.exports = (config) => {
config.set({
basePath: '',
frameworks: ['mocha', 'karma-typescript'],
files: [
'src/**/*.ts',
'test/**/*.ts'
],
reporters: ['progress', 'karma-typescript', 'coverage'],
preprocessors: {
'src/**/*.ts': ['karma-typescript', 'coverage'],
'test/**/*.ts': ['karma-typescript']
},
coverageReporter: {
dir: 'coverage/',
reporters: [
{ type: 'json', subdir: '.', file: 'coverage.json' },
{ type: 'cobertura', subdir: '.', file: 'cobertura.xml' },
{ type: 'html' }
]
},
mime: {
'text/x-typescript': ['ts']
},
plugins: [
require('karma-chrome-launcher'),
require('karma-mocha'),
require('karma-typescript'),
require('karma-coverage')
],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
captureTimeout: 120000,
browserDisconnectTolerance: 3,
browserDisconnectTimeout: 120000,
browserNoActivityTimeout: 120000,
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: [
'--headless',
'--no-sandbox',
'--disable-gpu',
'--disable-translate',
'--disable-extensions',
'--remote-debugging-port=9222'
]
}
},
singleRun: true,
concurrency: Infinity
})
}