-
Notifications
You must be signed in to change notification settings - Fork 5
/
karma.conf.js
44 lines (42 loc) · 1.09 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
const webpackConfig = require('./webpack.config')('development', {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'],
files: [
{
pattern: 'test/setup/karma.js',
watched: false
}
],
exclude: [],
preprocessors: {
'test/setup/karma.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
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: 50000
}
}
});
};