<commit_before>/*
 * @title Karma
 * @description Karma configuration file
 */


/*********************************************************************************
 1. DEPENDENCIES
 *********************************************************************************/

var bowerFiles = require('main-bower-files');
var sharedPaths = require('../shared/paths.js');


/*********************************************************************************
 2. TASK
 *********************************************************************************/

module.exports = function (config) {

  var files = bowerFiles().concat([
    sharedPaths.srcDir + '/js/**/*.js',
    sharedPaths.srcDir + '/js/**/*.spec.js'
  ]);

  config.set({
    basePath: __dirname + '/../../',
    frameworks: ['jasmine'],
    files: files,
    browsers: ['PhantomJS'],
    preprocessors: {
      'src/js/**/*.js': ['coverage']
    },
    reporters: ['spec', 'coverage'],
    coverageReporter: {
      reporters: [{
        type: 'html',
        dir: sharedPaths.outputDir + '/reports/coverage/',
        subdir: function (browser) {
          return browser.toLowerCase().split(/[ /-]/)[0];<commit_msg>fix(testing): adding configuration fix for bower components within karma<commit_after>/*
 * @title Karma
 * @description Karma configuration file
 */


/*********************************************************************************
 1. DEPENDENCIES
 *********************************************************************************/

var bowerFiles = require('main-bower-files');
var sharedPaths = require('../shared/paths.js');


/*********************************************************************************
 2. TASK
 *********************************************************************************/

module.exports = function (config) {

  var basePath = __dirname + '/../..';
  var files = bowerFiles({
    paths: {
      bowerDirectory: basePath + '/bower_components',
      bowerJson: basePath + '/bower.json'
    }
  }).concat([
    sharedPaths.srcDir + '/js/**/*.js',
    sharedPaths.srcDir + '/js/**/*.spec.js'
  ]);

  config.set({
    basePath: basePath,
    frameworks: ['jasmine'],
    files: files,
    browsers: ['PhantomJS'],
    preprocessors: {
      'src/js/**/*.js': ['coverage']
    },
    reporters: ['spec', 'coverage'],
    coverageReporter: {
      reporters: [{
        type: 'html',
        dir: sharedPaths.outputDir + '/reports/coverage/',
        subdir: function (browser) {
          return browser.toLowerCase().split(/[ /-]/)[0];
{'fraction_non_alphanumeric': 0.3953488372093023, 'fraction_numerical': 0.002364998029168309, 'mean_word_length': 3.8901734104046244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2731877', 'n_tokens_mistral': 681, 'n_tokens_neox': 652, 'n_words': 128}