<commit_before>process.env.TEST = true;
process.env.NODE_ENV = 'test';

const webpack = require("webpack")
const path = require("path")
const webpackConfig = require('./webpack.config.js')

delete webpackConfig.entry;

module.exports = function(config) {

  var configuration = {
    basePath: "",
    frameworks: ["mocha", "chai", "sinon", "es6-shim"],
    files: [
      "./test/entry.test.ts",
      "./test/**/**/**.test.ts",
      {
        pattern: '**/*.map',
        served: true,
        included: false,
        watched: true,
      },
    ],
    preprocessors: {
      "./**/**/**/**.ts": ["sourcemap"],
      "./test/**/**/**.test.ts": ["webpack"]
    },
    webpack: webpackConfig,
    webpackMiddleware: {
      noInfo: true
    },
    plugins: [
      "karma-webpack",
      "karma-sourcemap-writer",
      "karma-sourcemap-loader",
      "karma-remap-istanbul",
      "karma-mocha-reporter",
      "karma-mocha",
      "karma-chai",
      "karma-sinon",
      "karma-es6-shim",
      "karma-coverage",
    ],
    reporters: (config.singleRun
      ? ["dots", "mocha", "coverage"]
      : ["dots", "mocha"]),
    coverageReporter: {
      dir: "coverage",
      reporters: [
        { type: 'html', subdir: 'report-html' },
        { type: 'lcov', subdir: 'report-lcov' }
      ],
      instrumenterOptions: {
        istanbul: { noCompact: true }
      }
    },
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome']
  };

  if (process.env.TRAVIS) {
    configuration.browsers = ['PhantomJS'];
    configuration.plugins.push("karma-phantomjs-launcher");

  } else {
    configuration.plugins.push("karma-chrome-launcher");
    configuration.browsers = ['Chrome'];
  }

  config.set(configuration);
};<commit_msg>update karma.conf.js file. closes #5<commit_after>process.env.TEST = true;
process.env.NODE_ENV = 'test';

const webpack = require("webpack");
const path = require("path");
const webpackConfig = require('./webpack.config.js');

delete webpackConfig.entry;

module.exports = function(config) {

  var configuration = {
    basePath: "",
    frameworks: [
      "mocha",
      "chai",
      "sinon",
      "es6-shim"
    ],
    files: [
      "./test/entry.test.ts",
      "./test/**/**/**.test.ts",
      {
        pattern: '**/*.map',
        served: true,
        included: false,
        watched: true,
      },
    ],
    preprocessors: {
      "./**/**/**/**.ts": ["sourcemap"],
      "./test/**/**/**.test.ts": ["webpack"]
    },
    webpack: webpackConfig,
    webpackMiddleware: {
      noInfo: true
    },
    plugins: [
      "karma-webpack",
      "karma-sourcemap-writer",
      "karma-sourcemap-loader",
      "karma-remap-istanbul",
      "karma-mocha-reporter",
      "karma-mocha",
      "karma-chai",
      "karma-sinon",
      "karma-es6-shim",
      "karma-coverage",
    ],
    reporters: (config.singleRun
      ? ["dots", "mocha", "coverage"]
      : ["dots", "mocha"]),
    coverageReporter: {
      dir: "coverage",
      reporters: [
        { type: 'html', subdir: 'report-html' },
        { type: 'lcov', subdir: 'report-lcov' }
      ],
      instrumenterOptions: {
        istanbul: { noCompact: true }
      }
    },
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome']
  };

  if (process.env.TRAVIS) {
    configuration.browsers = ['PhantomJS'];
    configuration.plugins.push("karma-phantomjs-launcher");
  } else {
    configuration.plugins.push("karma-chrome-launcher");
    configuration.browsers = ['Chrome'];
  }

  config.set(configuration);
};
{'fraction_non_alphanumeric': 0.18675862068965518, 'fraction_numerical': 0.003586206896551724, 'mean_word_length': 2.3543015726179464, 'pattern_counts': {'":': 4, '<': 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': '1592415', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1251, 'n_words': 204}