-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
46 lines (44 loc) · 1.07 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
var webpackCfg = require('./webpack.config')
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function(config) {
const clientConfig = {
captureConsole: false,
mocha: {},
}
if (config.grep) {
clientConfig.args = ['--grep', config.grep]
}
config.set({
basePath: '',
browsers: ['ChromeHeadlessNoSandbox'],
captureTimeout: 60000,
client: clientConfig,
coverageReporter: {
dir: 'coverage/',
subdir: '.',
type: 'lcov',
},
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-setuid-sandbox'],
},
},
files: [
'src/store/*.ts',
'test/webpack/loadtests.ts',
],
frameworks: ['mocha', 'chai'],
port: 8080,
preprocessors: {
'src/store/*.ts': ['webpack', 'sourcemap', 'coverage'],
'test/webpack/loadtests.ts': ['webpack', 'sourcemap'],
},
reporters: ['mocha', 'coverage'],
singleRun: true,
webpack: webpackCfg,
webpackServer: {
noInfo: true,
},
})
}