-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
52 lines (39 loc) · 1.06 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
const webpack = require( './webpack.config.js' );
module.exports = function conf( config ) {
config.set({
files: [
'test/index.js',
],
frameworks: ['mocha'],
preprocessors: {
'test/index.js': [ 'webpack', 'sourcemap' ],
},
reporters: [ 'coverage', process.env.KARMA_REPORTER ],
webpack,
autoWatch: false,
singleRun: true,
browsers: ['Chrome_without_security'],
coverageReporter: {
type: 'html',
dir: 'coverage/',
},
logLevel: config.LOG_DISABLE,
client: {
captureConsole: process.env.KARMA_REPORTER === 'mocha',
mocha: {
bail: false,
timeout: 10000,
},
},
customLaunchers: {
Chrome_without_security: {
base: 'Chrome',
flags: ['--disable-web-security'],
},
},
webpackMiddleware: {
quiet: true,
stats: 'none',
},
});
};