test: refine expectation at back pressure callback
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 16 Dec 2023 18:36:31 +0000 (19:36 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 16 Dec 2023 18:36:31 +0000 (19:36 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/abstract-pool.test.mjs

index 5dc289359c704c51fb3feef8885eb75ff449c298..21cf10c8ebab4ae298e2efb98e0b0f9921f1791e 100644 (file)
@@ -1267,7 +1267,7 @@ describe('Abstract pool test suite', () => {
       stolenTasks: expect.any(Number),
       failedTasks: expect.any(Number)
     })
-    expect(pool.hasBackPressure.called).toBe(true)
+    expect(pool.hasBackPressure.callCount).toBe(5)
     await pool.destroy()
   })