<commit_before>const path = require('path');
const baseConfig = require('./karma.config.base');

module.exports = function (config) {
  // instrument only testing sources with Istanbul
  baseConfig.webpack.module.rules.push({
    test: /\.ts$/,
    enforce: 'post',
    use: [ 'istanbul-instrumenter-loader' ],
    include: path.join(__dirname, '..', 'src'),
  });

  const istanbulReports = {
    'text-summary': null,
  };

  if (process.env.CI) {
    istanbulReports.lcovonly = 'coverage/lcov.info';
  } else {
    istanbulReports.html = 'coverage/html';
  }

  config.set(Object.assign(baseConfig, {
    browsers: ['Chrome'],
    reporters: ['mocha', 'karma-remap-istanbul'],
    preprocessors: {
      '**/*.ts': ['webpack', 'sourcemap'],
    },
    remapIstanbulReporter: {
      reports: istanbulReports,
    },
  }));<commit_msg>fix(cover): fix file suffix<commit_after>const path = require('path');
const baseConfig = require('./karma.config.base');

module.exports = function (config) {
  // instrument only testing sources with Istanbul
  baseConfig.webpack.module.rules.push({
    test: /\.js$/,
    enforce: 'post',
    use: [ 'istanbul-instrumenter-loader' ],
    include: path.join(__dirname, '..', 'src'),
  });

  const istanbulReports = {
    'text-summary': null,
  };

  if (process.env.CI) {
    istanbulReports.lcovonly = 'coverage/lcov.info';
  } else {
    istanbulReports.html = 'coverage/html';
  }

  config.set(Object.assign(baseConfig, {
    browsers: ['Chrome'],
    reporters: ['mocha', 'karma-remap-istanbul'],
    preprocessors: {
      '**/*.js': ['webpack', 'sourcemap'],
    },
    remapIstanbulReporter: {
      reports: istanbulReports,
    },
  }));
{'fraction_non_alphanumeric': 0.17950236966824645, 'fraction_numerical': 0.0, 'mean_word_length': 3.308673469387755, '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': '3076858', 'n_tokens_mistral': 589, 'n_tokens_neox': 576, 'n_words': 101}