<commit_before>// Karma config
// https://karma-runner.github.io/0.12/config/configuration-file.html
'use strict';

var baseConfig = {
  frameworks: ['mocha'],
  reporters: ['verbose'],
  files: [
    // Third-Party Libraries
    'www/bower_components/chai/chai.js',

    // Polyfills for older browsers
    'www/polyfills/promise.js',
    'www/polyfills/typedarray.js',

    // Json Schema $Ref Parser
    'dist/ref-parser.min.js',
    { pattern: 'dist/*.map', included: false, served: true },

    // Test Fixtures
    'test/fixtures/**/*.js',

    // Tests
    'test/specs/**/*.js',
    { pattern: 'test/specs/**', included: false, served: true }
  ]
};

module.exports = function (config) {
  var debug = process.env.DEBUG ? process.env.DEBUG === 'true' : false;
  var karma = process.env.KARMA ? process.env.KARMA === 'true' : false;
  var coverage = process.env.KARMA_COVERAGE ? process.env.KARMA_COVERAGE === 'true' : false;
  var sauce = process.env.KARMA_SAUCE ? process.env.KARMA_SAUCE === 'true' : false;
  var sauceUsername = process.env.SAUCE_USERNAME;
  var sauceAccessKey = process.env.SAUCE_ACCESS_KEY;

  if (!karma) {
    // Karma is disabled, so abort immediately
    process.exit();
    return;
  }

  if (debug) {
    configureForDebugging(baseConfig);
  }
  else {
    if (coverage) {
      configureCodeCoverage(baseConfig);
    }

    if (sauce && sauceUsername && sauceAccessKey) {
      configureSauceLabs(baseConfig);
    }
    else {
      configureLocalBrowsers(baseConfig);
    }
  }

  console.log('Karma Config:\n', JSON.stringify(baseConfig, null, 2));
  config.set(baseConfig);
};

/**
 * Configures Karma to only run Chrome, and with unminified source code.
 * This is intended for debugging purposes only.<commit_msg>fixed the "npm run karma" script for local development<commit_after>// Karma config
// https://karma-runner.github.io/0.12/config/configuration-file.html
'use strict';

var baseConfig = {
  frameworks: ['mocha'],
  reporters: ['verbose'],
  files: [
    // Third-Party Libraries
    'www/bower_components/chai/chai.js',

    // Polyfills for older browsers
    'www/polyfills/promise.js',
    'www/polyfills/typedarray.js',

    // Json Schema $Ref Parser
    'dist/ref-parser.min.js',
    { pattern: 'dist/*.map', included: false, served: true },

    // Test Fixtures
    'test/fixtures/**/*.js',

    // Tests
    'test/specs/**/*.js',
    { pattern: 'test/specs/**', included: false, served: true }
  ]
};

module.exports = function (config) {
  var ci = process.env.CI ? process.env.CI === 'true' : false;
  var karma = process.env.KARMA ? process.env.KARMA === 'true' : false;
  var debug = process.env.DEBUG ? process.env.DEBUG === 'true' : false;
  var coverage = process.env.KARMA_COVERAGE ? process.env.KARMA_COVERAGE === 'true' : false;
  var sauce = process.env.KARMA_SAUCE ? process.env.KARMA_SAUCE === 'true' : false;
  var sauceUsername = process.env.SAUCE_USERNAME;
  var sauceAccessKey = process.env.SAUCE_ACCESS_KEY;

  if (ci && !karma) {
    // Karma is disabled, so abort immediately
    process.exit();
    return;
  }

  if (debug) {
    configureForDebugging(baseConfig);
  }
  else {
    if (coverage) {
      configureCodeCoverage(baseConfig);
    }

    if (sauce && sauceUsername && sauceAccessKey) {
      configureSauceLabs(baseConfig);
    }
    else {
      configureLocalBrowsers(baseConfig);
    }
  }

  console.log('Karma Config:\n', JSON.stringify(baseConfig, null, 2));
  config.set(baseConfig);
};

/**
 * Configures Karma to only run Chrome, and with unminified source code.
 * This is intended for debugging purposes only.
{'fraction_non_alphanumeric': 0.15016592920353983, 'fraction_numerical': 0.0022123893805309734, 'mean_word_length': 3.171856978085352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, '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': '52605', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1224, 'n_words': 264}