Skip to content

Commit 7afbfbb

Browse files
committed
No cleanup() when doing coverage
1 parent 0b1d426 commit 7afbfbb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

karma.conf.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ module.exports = function(karma) {
2222
const regex = karma.autoWatch ? /chart\.js$/ : /chart\.min\.js$/;
2323
const build = builds.filter(v => v.output.file && v.output.file.match(regex))[0];
2424

25+
if (args.coverage) {
26+
build.plugins = [
27+
json(),
28+
resolve(),
29+
istanbul({exclude: ['node_modules/**/*.js', 'package.json']})
30+
];
31+
}
32+
2533
karma.set({
2634
frameworks: ['jasmine'],
2735
reporters: ['progress', 'kjhtml'],
@@ -102,9 +110,6 @@ module.exports = function(karma) {
102110
});
103111

104112
if (args.coverage) {
105-
build.plugins.push(istanbul({
106-
exclude: 'node_modules/**/*.js'
107-
}));
108113
karma.reporters.push('coverage');
109114
karma.coverageReporter = {
110115
dir: 'coverage/',

0 commit comments

Comments
 (0)