<commit_before>const bluebird = require('bluebird')

describe('Hello', function() {
  it('works with async', async function() {
    expect(2).to.equal(2)
  })

  it('works with promises', async function() {
    let start = Date.now()
    await bluebird.delay(100)
    expect(Date.now() - start).to.be.gte(100)
  })

  it('works with generators', function*() {
    let start = Date.now()
    yield bluebird.delay(100)
    expect(Date.now() - start).to.be.gte(100)
  })

  // it('does not crash the process on test failure', function*() {
  //   log.info('In this test you should see a failure, but the process should not crash')
  //   expect(2).to.equal(1)
  // })

  it('supports sinon', function() {
    this.sinon.stub(Date, 'now', _ => 123)
    expect(Date.now()).to.eql(123)
  })
})<commit_msg>* bugfix: sometimes `yield bluebird.delay(100)` takes 99ms (rounding?)<commit_after>const bluebird = require('bluebird')

describe('Hello', function() {
  it('works with async', async function() {
    expect(2).to.equal(2)
  })

  it('works with promises', async function() {
    let start = Date.now()
    await bluebird.delay(100)
    expect(Date.now() - start).to.be.gte(99)
  })

  it('works with generators', function*() {
    let start = Date.now()
    yield bluebird.delay(100)
    expect(Date.now() - start).to.be.gte(99)
  })

  // it('does not crash the process on test failure', function*() {
  //   log.info('In this test you should see a failure, but the process should not crash')
  //   expect(2).to.equal(1)
  // })

  it('supports sinon', function() {
    this.sinon.stub(Date, 'now', _ => 123)
    expect(Date.now()).to.eql(123)
  })
})
{'fraction_non_alphanumeric': 0.18148820326678766, 'fraction_numerical': 0.028433151845130067, 'mean_word_length': 3.296103896103896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2205158', 'n_tokens_mistral': 605, 'n_tokens_neox': 567, 'n_words': 137}