refactor: silence sonar
[poolifier.git] / tests / pools / cluster / dynamic.test.mjs
index 93f995fcb4cfefd215ea90e348ec1e4023643745..2a654b6a878cab03a4da44afb7200ca122acf0c1 100644 (file)
@@ -37,10 +37,10 @@ describe('Dynamic cluster pool test suite', () => {
     expect(poolBusy).toBe(1)
     const numberOfExitEvents = await waitWorkerEvents(pool, 'exit', max - min)
     expect(numberOfExitEvents).toBe(max - min)
+    expect(pool.workerNodes.length).toBe(min)
   })
 
   it('Verify scale worker up and down is working', async () => {
-    expect(pool.workerNodes.length).toBe(min)
     for (let i = 0; i < max * 2; i++) {
       pool.execute()
     }
@@ -76,7 +76,7 @@ describe('Dynamic cluster pool test suite', () => {
 
   it('Validation of inputs test', () => {
     expect(() => new DynamicClusterPool(min)).toThrow(
-      "Cannot find the worker file 'undefined'"
+      'The worker file path must be specified'
     )
   })