@@ -13,7 +13,8 @@ import {stream as wiredep} from 'wiredep';
13
13
import nodemon from 'nodemon' ;
14
14
import { Server as KarmaServer } from 'karma' ;
15
15
import runSequence from 'run-sequence' ;
16
- import { protractor , webdriver_update } from 'gulp-protractor' ; < % if ( filters . stylus ) { % >
16
+ import { protractor , webdriver_update } from 'gulp-protractor' ;
17
+ import { Instrumenter } from 'isparta' ; < % if ( filters . stylus ) { % >
17
18
import nib from 'nib' ; < % } % >
18
19
19
20
var plugins = gulpLoadPlugins ( ) ;
@@ -158,16 +159,18 @@ let mocha = lazypipe()
158
159
} ) ;
159
160
160
161
let istanbul = lazypipe ( )
161
- . pipe ( plugins . babelIstanbul . writeReports )
162
- . pipe ( plugins . babelIstanbul . enforceThresholds , {
162
+ . pipe ( plugins . istanbul . writeReports )
163
+ . pipe ( plugins . istanbulEnforcer , {
163
164
thresholds : {
164
165
global : {
165
166
lines : 80 ,
166
167
statements : 80 ,
167
168
branches : 80 ,
168
169
functions : 80
169
170
}
170
- }
171
+ } ,
172
+ coverageDirectory : './coverage' ,
173
+ rootDirectory : ''
171
174
} ) ;
172
175
173
176
/********************
@@ -600,9 +603,12 @@ gulp.task('copy:server', () => {
600
603
gulp . task ( 'coverage:pre' , ( ) => {
601
604
return gulp . src ( paths . server . scripts )
602
605
// Covering files
603
- . pipe ( plugins . babelIstanbul ( ) )
606
+ . pipe ( plugins . istanbul ( {
607
+ instrumenter : Instrumenter , // Use the isparta instrumenter (code coverage for ES6)
608
+ includeUntested : true
609
+ } ) )
604
610
// Force `require` to return covered files
605
- . pipe ( plugins . babelIstanbul . hookRequire ( ) ) ;
611
+ . pipe ( plugins . istanbul . hookRequire ( ) ) ;
606
612
} ) ;
607
613
608
614
gulp . task ( 'coverage:unit' , ( ) => {
0 commit comments