<commit_before>'use strict';

var Mocha = require('mocha');
var color = Mocha.reporters.Base.color;
var path = require('path');
var Module = require('module');
var generateSauceReporter = require('./mocha-sauce-reporter');
var fs = require('fs');
var path = require('path');
var domain = require('domain');

module.exports = function (opts, fileGroup, browser, grunt, onTestFinish) {
  //browserTitle means we're on a SL test
  if (browser.browserTitle) {
    if (opts.reporter && opts.concurrency > 1) {
      if (!opts.customReporter) {
        console.log(color('medium', 'ignoring "reporter" option because concurrency is > 1'));
        opts.reporter = generateSauceReporter(browser);
      } else {
        // to allow customReporter
        // check ./mocha-sauce-reporter or https://github.com/saadtazi/gmwd-teamcity-reporter
        opts.reporter = require(opts.reporter)(browser);
      }
    }
  }

  var cwd = process.cwd();
  module.paths.push(cwd, path.join(cwd, 'node_modules'));
  if (opts && opts.require) {
    var mods = opts.require;
    if (!(mods instanceof Array)) { mods = [mods]; }
    mods.forEach(function(mod) {
      var abs = fs.existsSync(mod) || fs.existsSync(mod + '.js');
      if (abs) {
        mod = path.resolve(mod);
      }
      require(mod);
    });
  }

  var mocha = new Mocha(opts);<commit_msg>fix a bug: no reporter is concurrency was 1<commit_after>'use strict';

var Mocha = require('mocha');
var color = Mocha.reporters.Base.color;
var path = require('path');
var Module = require('module');
var generateSauceReporter = require('./mocha-sauce-reporter');
var fs = require('fs');
var path = require('path');
var domain = require('domain');

module.exports = function (opts, fileGroup, browser, grunt, onTestFinish) {
  //browserTitle means we're on a SL test
  if (browser.browserTitle) {
    if (opts.reporter && opts.concurrency > 1) {
      if (!opts.customReporter) {
        console.log(color('medium', 'ignoring "reporter" option because concurrency is > 1'));
        opts.reporter = generateSauceReporter(browser);
      }
    }
    if (opts.customReporter) {
      // to allow customReporter
      // check ./mocha-sauce-reporter or https://github.com/saadtazi/gmwd-teamcity-reporter
      opts.reporter = require(opts.reporter)(browser, opts);
    }
    
  }

  var cwd = process.cwd();
  module.paths.push(cwd, path.join(cwd, 'node_modules'));
  if (opts && opts.require) {
    var mods = opts.require;
    if (!(mods instanceof Array)) { mods = [mods]; }
    mods.forEach(function(mod) {
      var abs = fs.existsSync(mod) || fs.existsSync(mod + '.js');
      if (abs) {
        mod = path.resolve(mod);
      }
      require(mod);
    });
  }

  var mocha = new Mocha(opts);
{'fraction_non_alphanumeric': 0.15539305301645337, 'fraction_numerical': 0.0018281535648994515, 'mean_word_length': 3.1898928024502298, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '2980228', 'n_tokens_mistral': 921, 'n_tokens_neox': 893, 'n_words': 211}