fix: fix pool ready event emission
[poolifier.git] / tests / pools / cluster / dynamic.test.mjs
index 93dcc7fad89e8adb942ce667d99e21ebb2a91e88..2c542375e5f5fda1b83daea9fe29c3d205150f49 100644 (file)
@@ -67,13 +67,14 @@ describe('Dynamic cluster pool test suite', () => {
     await pool.destroy()
     const numberOfExitEvents = await exitPromise
     expect(pool.started).toBe(false)
+    expect(pool.readyEventEmitted).toBe(false)
     expect(pool.workerNodes.length).toBe(0)
     expect(numberOfExitEvents).toBe(min)
     expect(poolDestroy).toBe(1)
   })
 
   it('Validation of inputs test', () => {
-    expect(() => new DynamicClusterPool(min)).toThrowError(
+    expect(() => new DynamicClusterPool(min)).toThrow(
       "Cannot find the worker file 'undefined'"
     )
   })