<commit_before>var webpack = require('webpack');

module.exports = function (config) {
  // Browsers to run on BrowserStack
  var customLaunchers = {
    BS_Chrome: {
      base: 'BrowserStack',
      os: 'OS X',
      os_version: 'Yosemite',
      browser: 'chrome',
      browser_version: '39.0',
    },
    BS_Firefox: {
      base: 'BrowserStack',
      os: 'OS X',
      os_version: 'Yosemite',
      browser: 'firefox',
      browser_version: '32.0',
    },
    BS_Safari: {
      base: 'BrowserStack',
      os: 'OS X',
      os_version: 'Yosemite',
      browser: 'safari',
      browser_version: '8.0',
    },
//    BS_InternetExplorer_9: {
//      base: 'BrowserStack',
//      os: 'Windows',
//      os_version: '7',
//      browser: 'ie',
//      browser_version: '9.0',
//    },
    BS_InternetExplorer_10: {
      base: 'BrowserStack',
      os: 'Windows',
      os_version: '8',
      browser: 'ie',
      browser_version: '10.0',
    },
    BS_InternetExplorer_11: {
      base: 'BrowserStack',
      os: 'Windows',
      os_version: '8.1',
      browser: 'ie',
      browser_version: '11.0',
    },
    BS_MobileSafari: {
      base: 'BrowserStack',
      os: 'iOS',
      os_version: '8.3',
      device: 'iPhone 6'
    },
  };

  config.set({
    customLaunchers: customLaunchers,

    browsers: [ 'Chrome' ],
    browserNoActivityTimeout: 30000,
    captureTimeout: 30000,
    frameworks: [ 'mocha' ],
    reporters: [ 'mocha' ],

    files: [
      'tests.webpack.js'
    ],

    preprocessors: {
      'tests.webpack.js': [ 'webpack', 'sourcemap' ]
    },

    webpack: {
      devtool: 'inline-source-map',
      module: {
        loaders: [
          { test: /\.js$/, exclude: /node_modules/, loader: 'babel' }
        ]
      },
      plugins: [
        new webpack.DefinePlugin({
          'process.env.NODE_ENV': JSON.stringify('test')
        })
      ]
    },

    webpackServer: {
      noInfo: true
    }
  });

  if (process.env.USE_CLOUD) {
    config.browsers = Object.keys(customLaunchers);
    config.reporters = [ 'dots' ];

    // Karma (with socket.io 1.x) buffers by 50 and 50 tests can take a long time on IEs
    config.browserNoActivityTimeout = 120000;

    // Allocating a browser in Sauce Labs can take a while (e.g. if we are out of
    // capacity and need to wait for another build to finish) so captureTimeout
    // typically kills an in-queue-pending request, which makes no sense.
    config.captureTimeout = 0;

    config.browserStack = {
      username: process.env.BROWSER_STACK_USERNAME,
      accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
      startTunnel: true,
    };
  } else if (process.env.TRAVIS) {
    config.browsers = Object.keys(customLaunchers);
    config.reporters = [ 'dots' ];

    // Karma (with socket.io 1.x) buffers by 50 and 50 tests can take a long time on IEs
    config.browserNoActivityTimeout = 120000;

    // Allocating a browser in Sauce Labs can take a while (e.g. if we are out of
    // capacity and need to wait for another build to finish) so captureTimeout
    // typically kills an in-queue-pending request, which makes no sense.
    config.captureTimeout = 0;

    var buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';

    config.browserStack = {
      username: process.env.BROWSER_STACK_USERNAME,
      accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
      startTunnel: true,
      project: 'history',
      build: buildLabel,
      name: process.env.TRAVIS_JOB_NUMBER,
    };

    config.singleRun = true;
  }<commit_msg>Delete a bunch of timeout stuff<commit_after>var webpack = require('webpack');

module.exports = function (config) {
  // Browsers to run on BrowserStack
  var customLaunchers = {
    BS_Chrome: {
      base: 'BrowserStack',
      os: 'OS X',
      os_version: 'Yosemite',
      browser: 'chrome',
      browser_version: '39.0',
    },
    BS_Firefox: {
      base: 'BrowserStack',
      os: 'OS X',
      os_version: 'Yosemite',
      browser: 'firefox',
      browser_version: '32.0',
    },
    BS_Safari: {
      base: 'BrowserStack',
      os: 'OS X',
      os_version: 'Yosemite',
      browser: 'safari',
      browser_version: '8.0',
    },
//    BS_InternetExplorer_9: {
//      base: 'BrowserStack',
//      os: 'Windows',
//      os_version: '7',
//      browser: 'ie',
//      browser_version: '9.0',
//    },
    BS_InternetExplorer_10: {
      base: 'BrowserStack',
      os: 'Windows',
      os_version: '8',
      browser: 'ie',
      browser_version: '10.0',
    },
    BS_InternetExplorer_11: {
      base: 'BrowserStack',
      os: 'Windows',
      os_version: '8.1',
      browser: 'ie',
      browser_version: '11.0',
    },
    BS_MobileSafari: {
      base: 'BrowserStack',
      os: 'iOS',
      os_version: '8.3',
      device: 'iPhone 6'
    },
  };

  config.set({
    customLaunchers: customLaunchers,

    browsers: [ 'Chrome' ],
    frameworks: [ 'mocha' ],
    reporters: [ 'mocha' ],

    files: [
      'tests.webpack.js'
    ],

    preprocessors: {
      'tests.webpack.js': [ 'webpack', 'sourcemap' ]
    },

    webpack: {
      devtool: 'inline-source-map',
      module: {
        loaders: [
          { test: /\.js$/, exclude: /node_modules/, loader: 'babel' }
        ]
      },
      plugins: [
        new webpack.DefinePlugin({
          'process.env.NODE_ENV': JSON.stringify('test')
        })
      ]
    },

    webpackServer: {
      noInfo: true
    }
  });

  if (process.env.USE_CLOUD) {
    config.browsers = Object.keys(customLaunchers);
    config.reporters = [ 'dots' ];

    config.browserStack = {
      username: process.env.BROWSER_STACK_USERNAME,
      accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
      startTunnel: true,
    };
  } else if (process.env.TRAVIS) {
    config.browsers = Object.keys(customLaunchers);
    config.reporters = [ 'dots' ];

    var buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';

    config.browserStack = {
      username: process.env.BROWSER_STACK_USERNAME,
      accessKey: process.env.BROWSER_STACK_ACCESS_KEY,
      startTunnel: true,
      project: 'history',
      build: buildLabel,
      name: process.env.TRAVIS_JOB_NUMBER,
    };

    config.singleRun = true;
  }
{'fraction_non_alphanumeric': 0.13904761904761906, 'fraction_numerical': 0.014285714285714285, 'mean_word_length': 2.298952879581152, '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': '1720697', 'n_tokens_mistral': 2240, 'n_tokens_neox': 2136, 'n_words': 457}