File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,14 @@ module.exports = function(karma) {
2222 const regex = karma . autoWatch ? / c h a r t \. j s $ / : / c h a r t \. m i n \. j s $ / ;
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/' ,
You can’t perform that action at this time.
0 commit comments