-
Notifications
You must be signed in to change notification settings - Fork 52
/
karma.conf.js
57 lines (55 loc) · 1.36 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
const webpackConfig = require('./webpack.config')({ playerType: 'ovp' }, { 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: [
{
pattern: 'tests/index.js',
watched: false
},
{
pattern: 'tests/assets/**/*',
included: false
}
],
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']
}
},
browsers: ['ChromeHeadlessWithFlags'],
singleRun: true,
concurrency: Infinity,
client: {
mocha: {
reporter: 'html',
timeout: 50000
}
}
});
};