-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathkarma-coverage.conf.js
51 lines (44 loc) · 1.24 KB
/
karma-coverage.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
const karmaConfig = require('./karma.conf.js');
module.exports = function (config) {
karmaConfig(config);
const preset = Object.assign(karmaConfig, {
reporters: ['progress', 'coverage'],
coverageReporter: {
reporters: [
{
type: 'lcov',
subdir: 'lcov',
},
{
type: 'text-summary',
}
],
},
webpack: {
mode: 'development',
module: {
rules: [{
test: /\.js$/,
exclude: /(node_modules)|(lib)|(build)/,
use: {
loader: 'babel-loader',
options: {
compact: true,
comments: false,
presets: ['env'],
plugins: ['istanbul']
}
}
}]
}
},
plugins: [
'karma-chai-sinon',
'karma-chrome-launcher',
'karma-mocha',
'karma-webpack',
'karma-sharding'
],
});
config.set(preset);
}