<commit_before>'use strict'
const Test = require('./test.js')
const Stdin = require('./stdin.js')
const Spawn = require('./spawn.js')
const util = require('util')
const objToYaml = require('./obj-to-yaml.js')
const yaml = require('js-yaml')
const _didPipe = Symbol('_didPipe')

// We test that file separately, and removing stdout
// causes some weird behavior in the Node test runner.
/* istanbul ignore next */
if (!process.stdout) {
  require('./stdio-polyfill')()
}

const monkeypatchEpipe = () => {
  const emit = process.stdout.emit
  process.stdout.emit = function (ev, er) {
    if (ev !== 'error' || er.code !== 'EPIPE')
      return emit.apply(process.stdout, arguments)
  }
}

const monkeypatchExit = () => {
  const exit = process.exit
  const reallyExit = process.reallyExit

  // ensure that we always get run, even if a user does
  // process.on('exit', process.exit)
  // Ignore until Node.js un-breaks process.reallyExit hooks
  /* istanbul ignore next */
  process.reallyExit = code =>
    reallyExit.call(process, onExitEvent(code))

  process.exit = code =>
    exit.call(process, onExitEvent(code))

  process.on('exit', onExitEvent)
}

class TAP extends Test {
  constructor (options) {
    super(options)
    this.runOnly = process.env.TAP_ONLY === '1'
    this.childId = +process.env.TAP_CHILD_ID || 0
    this.start = Date.now()<commit_msg>node 11 no longer blocks process.reallyExit<commit_after>'use strict'
const Test = require('./test.js')
const Stdin = require('./stdin.js')
const Spawn = require('./spawn.js')
const util = require('util')
const objToYaml = require('./obj-to-yaml.js')
const yaml = require('js-yaml')
const _didPipe = Symbol('_didPipe')

// We test that file separately, and removing stdout
// causes some weird behavior in the Node test runner.
/* istanbul ignore next */
if (!process.stdout) {
  require('./stdio-polyfill')()
}

const monkeypatchEpipe = () => {
  const emit = process.stdout.emit
  process.stdout.emit = function (ev, er) {
    if (ev !== 'error' || er.code !== 'EPIPE')
      return emit.apply(process.stdout, arguments)
  }
}

const monkeypatchExit = () => {
  const exit = process.exit
  const reallyExit = process.reallyExit

  // ensure that we always get run, even if a user does
  // process.on('exit', process.exit)
  process.reallyExit = code =>
    reallyExit.call(process, onExitEvent(code))

  process.exit = code =>
    exit.call(process, onExitEvent(code))

  process.on('exit', onExitEvent)
}

class TAP extends Test {
  constructor (options) {
    super(options)
    this.runOnly = process.env.TAP_ONLY === '1'
    this.childId = +process.env.TAP_CHILD_ID || 0
    this.start = Date.now()
{'fraction_non_alphanumeric': 0.149063670411985, 'fraction_numerical': 0.0022471910112359553, 'mean_word_length': 3.653310104529617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1937313', 'n_tokens_mistral': 880, 'n_tokens_neox': 847, 'n_words': 231}