-
Notifications
You must be signed in to change notification settings - Fork 7
/
karma.conf.js
48 lines (46 loc) · 1.24 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
const webpackConfig = require('./webpack.config')( null, {mode: 'development'});
delete webpackConfig.entry;
delete webpackConfig.externals;
delete webpackConfig.output;
delete webpackConfig.devServer;
webpackConfig.devtool = 'inline-source-map';
module.exports = function (config) {
config.set({
frameworks: ['webpack', 'mocha'],
browserDisconnectTimeout: 60000,
browserNoActivityTimeout: 60000,
files: ['tests/index.js'],
exclude: [],
preprocessors: {
'tests/index.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
mochaReporter: {
showDiff: true,
},
coverageIstanbulReporter: {
reports: ['lcov', 'text-summary'],
fixWebpackSourcePaths: true
},
webpack: webpackConfig,
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
customLaunchers: {
ChromeHeadlessWithFlags: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--autoplay-policy=no-user-gesture-required', '--mute-audio', '--max-web-media-player-count=1000']
}
},
browsers: ['ChromeHeadlessWithFlags'],
singleRun: true,
concurrency: Infinity,
client: {
mocha: {
reporter: 'html',
timeout: 5000
}
}
});
};