<commit_before>'use strict';

var _ = require('underscore');
var expect = require('chai').expect;
var when = require('when');
var OnMessage = require('./util/on_message');
var stream = require('./util/stream');
var suiteRunner = require('../lib/suite_runner');


function ParallelismCounter() {
  this.maxParallelism = 0;
  this._currentTests = {};
}

ParallelismCounter.prototype.gotMessage = function(testPath, message) {
  var pathAsString = JSON.stringify(testPath);
  if (message.type === 'begin') {
    this._currentTests[pathAsString] = true;

    this.maxParallelism = Math.max(this.maxParallelism, _.keys(this._currentTests).length);
  } else if (message.type === 'finish') {
    delete this._currentTests[pathAsString];
  }
};


function listNames(names) {
  return names
    .map(function(name) { return '"' + names + '"'; })
    .join(', ');
}

function shouldFail(promise) {<commit_msg>Fix minor bug in debug helper function<commit_after>'use strict';

var _ = require('underscore');
var expect = require('chai').expect;
var when = require('when');
var OnMessage = require('./util/on_message');
var stream = require('./util/stream');
var suiteRunner = require('../lib/suite_runner');


function ParallelismCounter() {
  this.maxParallelism = 0;
  this._currentTests = {};
}

ParallelismCounter.prototype.gotMessage = function(testPath, message) {
  var pathAsString = JSON.stringify(testPath);
  if (message.type === 'begin') {
    this._currentTests[pathAsString] = true;

    this.maxParallelism = Math.max(this.maxParallelism, _.keys(this._currentTests).length);
  } else if (message.type === 'finish') {
    delete this._currentTests[pathAsString];
  }
};


function listNames(names) {
  return names
    .map(function(name) { return '"' + name + '"'; })
    .join(', ');
}

function shouldFail(promise) {
{'fraction_non_alphanumeric': 0.16575192096597147, 'fraction_numerical': 0.0010976948408342481, 'mean_word_length': 4.679127725856698, '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': '632155', 'n_tokens_mistral': 569, 'n_tokens_neox': 566, 'n_words': 114}