<commit_before>'use strict';

const component = require('./parseComponentName');
const gulp = require('gulp');
const gulpQunit = require('gulp-qunit');

//const configTest = require( '../config' ).tests;
const gulpIstanbul = require( 'gulp-istanbul' );
const gulpMocha = require( 'gulp-mocha' );

/**
 * Run Mocha JavaScript unit tests.
 * @param {Function} cb - Callback function to call on completion.
 */
function unitTest( cb ) {
  gulp.src( ['./src/**/*.js', '!./src/**/node_modules/**/*.js'] )
  .pipe( gulpIstanbul( {
    includeUntested: true
  } ) )
  .pipe( gulpIstanbul.hookRequire() )
  .on( 'finish', () => {
    gulp.src( 'test/unit-test/**/*.js' )
    .pipe( gulpMocha( {
      reporter: 'nyan'
    } ) )
    .pipe( gulpIstanbul.writeReports( {
      dir: 'test/unit-test-coverage'
    } ) )
    .on( 'end', cb );
  } );<commit_msg>Exclude unneeded paths<commit_after>'use strict';

const component = require('./parseComponentName');
const gulp = require('gulp');
const gulpQunit = require('gulp-qunit');

//const configTest = require( '../config' ).tests;
const gulpIstanbul = require( 'gulp-istanbul' );
const gulpMocha = require( 'gulp-mocha' );

/**
 * Run Mocha JavaScript unit tests.
 * @param {Function} cb - Callback function to call on completion.
 */
function unitTest( cb ) {
  gulp.src( ['./src/**/*.js',
             '!./src/**/node_modules/**/*.js',
             '!./src/**/src/cf-*',
             '!./src/capital-framework.js'] )
  .pipe( gulpIstanbul( {
    includeUntested: true
  } ) )
  .pipe( gulpIstanbul.hookRequire() )
  .on( 'finish', () => {
    gulp.src( 'test/unit-test/**/*.js' )
    .pipe( gulpMocha( {
      reporter: 'nyan'
    } ) )
    .pipe( gulpIstanbul.writeReports( {
      dir: 'test/unit-test-coverage'
    } ) )
    .on( 'end', cb );
  } );
{'fraction_non_alphanumeric': 0.20278551532033426, 'fraction_numerical': 0.0, 'mean_word_length': 2.879049676025918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5176338', 'n_tokens_mistral': 662, 'n_tokens_neox': 644, 'n_words': 134}