<commit_before>import { MochaAdapter } from '../lib/adapter'

const specs = ['./test/fixtures/tests.spec.js']
const NOOP = () => {}

const WebdriverIO = class {}
WebdriverIO.prototype = {
    pause: (ms = 500) => new Promise((r) => {
        setTimeout(() => r(), ms)
    })
}

process.send = NOOP

describe('MochaAdapter executes specs asyncronous', () => {
    before(async () => {
        global.browser = new WebdriverIO()
        const adapter = new MochaAdapter(0, {}, specs, {})
        await adapter.run()
    })

    it('should run async commands in beforeEach blocks', () => {
        global._____wdio.beforeEach.should.be.greaterThan(500)
    })

    it('should run async commands in before blocks', () => {
        global._____wdio.before.should.be.greaterThan(500)
    })

    it('should run async commands in it blocks', () => {
        global._____wdio.it.should.be.greaterThan(500)
    })

    it('should run async commands in nested it blocks', () => {
        global._____wdio.nestedit.should.be.greaterThan(500)
    })

    it('should run async commands in after blocks', () => {
        global._____wdio.after.should.be.greaterThan(500)
    })

    it('should run async commands in afterEach blocks', () => {
        global._____wdio.afterEach.should.be.greaterThan(500)
    })
})<commit_msg>tests are too fast mate<commit_after>import { MochaAdapter } from '../lib/adapter'

const specs = ['./test/fixtures/tests.spec.js']
const NOOP = () => {}

const WebdriverIO = class {}
WebdriverIO.prototype = {
    pause: (ms = 500) => new Promise((r) => {
        setTimeout(() => r(), ms)
    })
}

process.send = NOOP

describe('MochaAdapter executes specs asyncronous', () => {
    before(async () => {
        global.browser = new WebdriverIO()
        const adapter = new MochaAdapter(0, {}, specs, {})
        await adapter.run()
    })

    it('should run async commands in beforeEach blocks', () => {
        global._____wdio.beforeEach.should.be.greaterThan(499)
    })

    it('should run async commands in before blocks', () => {
        global._____wdio.before.should.be.greaterThan(499)
    })

    it('should run async commands in it blocks', () => {
        global._____wdio.it.should.be.greaterThan(499)
    })

    it('should run async commands in nested it blocks', () => {
        global._____wdio.nestedit.should.be.greaterThan(499)
    })

    it('should run async commands in after blocks', () => {
        global._____wdio.after.should.be.greaterThan(499)
    })

    it('should run async commands in afterEach blocks', () => {
        global._____wdio.afterEach.should.be.greaterThan(499)
    })
})
{'fraction_non_alphanumeric': 0.1556567957479119, 'fraction_numerical': 0.016704631738800303, 'mean_word_length': 2.8579795021961933, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '1831184', 'n_tokens_mistral': 875, 'n_tokens_neox': 810, 'n_words': 178}