<commit_before>require('colors');

var SpecReporter = function (baseReporterDecorator, formatError, config) {
  baseReporterDecorator(this);

  var platform = process ? process.platform : 'unknown';
  var selectPrefix = function(defaultMarker, win32Marker) {
    return platform === 'win32' ? win32Marker : defaultMarker;
  }
  var reporterCfg = config.specReporter || {};
  this.prefixes = Object.assign({
      success: selectPrefix('✓ ', '\u221A '),
      failure: selectPrefix('✗ ', '\u00D7 '),
      skipped: selectPrefix('- ', '\- ')
    }, reporterCfg.prefixes);

  this.failures = [];
  this.USE_COLORS = false;

  // colorize output of BaseReporter functions
  if (config.colors) {
    this.USE_COLORS = true;
    this.SPEC_FAILURE = '%s %s FAILED'.red + '\n';
    this.SPEC_SLOW = '%s SLOW %s: %s'.yellow + '\n';
    this.ERROR = '%s ERROR'.red + '\n';
    this.FINISHED_ERROR = ' ERROR'.red;
    this.FINISHED_SUCCESS = ' SUCCESS'.green;
    this.FINISHED_DISCONNECTED = ' DISCONNECTED'.red;
    this.X_FAILED = ' (%d FAILED)'.red;
    this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS'.green + '\n';<commit_msg>fix(colors): Set colors.enabled = true when colors is defined<commit_after>var colors = require('colors');

var SpecReporter = function (baseReporterDecorator, formatError, config) {
  baseReporterDecorator(this);

  var platform = process ? process.platform : 'unknown';
  var selectPrefix = function(defaultMarker, win32Marker) {
    return platform === 'win32' ? win32Marker : defaultMarker;
  }
  var reporterCfg = config.specReporter || {};
  this.prefixes = Object.assign({
      success: selectPrefix('✓ ', '\u221A '),
      failure: selectPrefix('✗ ', '\u00D7 '),
      skipped: selectPrefix('- ', '\- ')
    }, reporterCfg.prefixes);

  this.failures = [];
  this.USE_COLORS = false;

  // colorize output of BaseReporter functions
  if (config.colors) {
    colors.enabled = true;
    this.USE_COLORS = true;
    this.SPEC_FAILURE = '%s %s FAILED'.red + '\n';
    this.SPEC_SLOW = '%s SLOW %s: %s'.yellow + '\n';
    this.ERROR = '%s ERROR'.red + '\n';
    this.FINISHED_ERROR = ' ERROR'.red;
    this.FINISHED_SUCCESS = ' SUCCESS'.green;
    this.FINISHED_DISCONNECTED = ' DISCONNECTED'.red;
    this.X_FAILED = ' (%d FAILED)'.red;
    this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS'.green + '\n';
{'fraction_non_alphanumeric': 0.1603284356093345, 'fraction_numerical': 0.010371650821089023, 'mean_word_length': 3.5660749506903353, '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': '5459726', 'n_tokens_mistral': 799, 'n_tokens_neox': 774, 'n_words': 164}