<commit_before>const {describe, it, beforeEach, afterEach} = require('mocha')

describe('cli', () => {
  beforeEach(function () {
    this.log = console.log
    this.argv = process.argv
    this.exit = process.exit
  })

  afterEach(function () {
    console.log = this.log
    process.exit = this.exit
    process.argv = this.argv
  })

  it('runs the version command', async function () {
    this.output = ''
    console.log = output => { this.output += output + '\n' }
    process.exit = code => { this.code = code }
    process.argv = ['node', 'heroku', 'version']
    await require('../cli')
    this.output.should.match(/^heroku-cli/)
    this.code.should.eq(0)
  })
})<commit_msg>fix test output<commit_after>const {describe, it, beforeEach, afterEach} = require('mocha')

describe('cli', () => {
  beforeEach(function () {
    this.log = console.log
    this.argv = process.argv
    this.exit = process.exit
  })

  afterEach(function () {
    console.log = this.log
    process.exit = this.exit
    process.argv = this.argv
  })

  it('runs the version command', async function () {
    this.output = ''
    console.log = output => { this.output += output + '\n' }
    process.exit = code => { this.code = code }
    process.argv = ['node', 'heroku', 'version']
    await require('../cli')
    this.output.should.match(/^heroku-cli/)
    this.code.should.eq(0)
    console.log = this.log
  })
})
{'fraction_non_alphanumeric': 0.17437722419928825, 'fraction_numerical': 0.0014234875444839859, 'mean_word_length': 2.8626373626373627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5659260', 'n_tokens_mistral': 468, 'n_tokens_neox': 459, 'n_words': 94}