function testUnitScripts( cb ) {
  gulp.src( configTest.src )
    .pipe( gulpIstanbul( {
      includeUntested: false
    } ) )
    .pipe( gulpIstanbul.hookRequire() )
    .on( 'finish', function() {
      gulp.src( configTest.tests + '/unit_tests/**/*.js' )
        .pipe( gulpMocha( {
          reporter: configTest.reporter ? 'spec' : 'nyan'
        } ) )
        .pipe( gulpIstanbul.writeReports( {
          dir: configTest.tests + '/unit_test_coverage'
        } ) )

        /* TODO: we want this but it breaks because we don't have good coverage
        .pipe( gulpIstanbul.enforceThresholds( {
          thresholds: { global: 90 }
        } ) )
        */

        .on( 'end', cb );
    } );
}
/**
 * Run Mocha JavaScript unit tests.
 * @param {Function} cb - Callback function to call on completion.
 */
Run Mocha JavaScript unit tests.
@param {Function} cb - Callback function to call on completion.
Run Mocha JavaScript unit tests . @param { Function } cb - Callback function to call on completion .
function testUnitScripts( cb ) {
  gulp.src( configTest.src )
    .pipe( gulpIstanbul( {
      includeUntested: false
    } ) )
    .pipe( gulpIstanbul.hookRequire() )
    .on( 'finish', function() {
      gulp.src( configTest.tests + '/unit_tests/**/*.js' )
        .pipe( gulpMocha( {
          reporter: configTest.reporter ? 'spec' : 'nyan'
        } ) )
        .pipe( gulpIstanbul.writeReports( {
          dir: configTest.tests + '/unit_test_coverage'
        } ) )
        .on( 'end', cb );
    } );
}
function testUnitScripts ( cb ) { gulp . src ( configTest . src ) . pipe ( gulpIstanbul ( { includeUntested : false } ) ) . pipe ( gulpIstanbul . hookRequire ( ) ) . on ( 'finish' , function ( ) { gulp . src ( configTest . tests + '/unit_tests/**/*.js' ) . pipe ( gulpMocha ( { reporter : configTest . reporter ? 'spec' : 'nyan' } ) ) . pipe ( gulpIstanbul . writeReports ( { dir : configTest . tests + '/unit_test_coverage' } ) ) . on ( 'end' , cb ) ; } ) ; }
Run Mocha JavaScript unit tests.
Run Mocha JavaScript unit tests .
/* TODO: we want this but it breaks because we don't have good coverage
        .pipe( gulpIstanbul.enforceThresholds( {
          thresholds: { global: 90 }
        } ) )
        */