await pool.destroy()
const numberOfExitEvents = await exitPromise
expect(pool.started).toBe(false)
+ expect(pool.emitter.eventNames()).toStrictEqual([])
expect(pool.readyEventEmitted).toBe(false)
expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(min)
await pool.destroy()
const numberOfExitEvents = await exitPromise
expect(pool.started).toBe(false)
+ expect(pool.emitter.eventNames()).toStrictEqual([])
expect(pool.readyEventEmitted).toBe(false)
expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(numberOfWorkers)
await pool.destroy()
const numberOfExitEvents = await exitPromise
expect(pool.started).toBe(false)
+ expect(pool.emitter.eventNames()).toStrictEqual([])
expect(pool.readyEventEmitted).toBe(false)
expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(min)
const numberOfExitEvents = await exitPromise
expect(pool.started).toBe(false)
expect(pool.readyEventEmitted).toBe(false)
+ expect(pool.emitter.eventNames()).toStrictEqual([])
expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(numberOfThreads)
expect(poolDestroy).toBe(1)