{"size": 815, "ext": "js", "max_stars_repo_path": "test/karma-coverage.config.babel.js", "max_stars_repo_name": "fivagod/postscribe", "max_stars_repo_stars_event_min_datetime": "2015-01-04T07:01:24.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-22T21:36:34.000Z", "max_issues_repo_path": "test/karma-coverage.config.babel.js", "max_issues_repo_name": "fivagod/postscribe", "max_issues_repo_issues_event_min_datetime": "2015-01-11T15:46:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-24T11:27:12.000Z", "max_forks_repo_path": "test/karma-coverage.config.babel.js", "max_forks_repo_name": "fivagod/postscribe", "max_forks_repo_forks_event_min_datetime": "2015-01-06T11:32:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-22T23:30:25.000Z"}
{"max_stars_count": 667, "max_issues_count": 396, "max_forks_count": 137, "avg_line_length": 18.9534883721, "max_line_length": 68, "alphanum_fraction": 0.5791411043}
/* eslint-env node */
import path from 'path';
import isparta from 'isparta';
import pkg from '../package.json';
import baseConfig from './karma-base.config.babel.js';

module.exports = config => {
  baseConfig.webpack.module.preLoaders = [
    {
      test: /\.js$/,
      loader: 'isparta',
      include: path.resolve('src/')
    }
  ];

  baseConfig.coverageReporter = {
    // configure the reporter to use isparta for JavaScript coverage
    instrumenters: {
      isparta
    },

    instrumenter: {
      'src/**/*.js': 'isparta'
    },

    instrumenterOptions: {
      isparta: {
        babel: pkg.babel,
        noAutoWrap: true
      }
    },

    reporters: [
      {type: 'text-summary'},
      {type: 'text'}
    ]
  };

  baseConfig.reporters = ['mocha', 'coverage'];

  config.set(baseConfig);
};
