From: Jérôme Benoit Date: Sat, 16 Dec 2023 18:36:31 +0000 (+0100) Subject: test: refine expectation at back pressure callback X-Git-Tag: v3.1.2~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e458c82ec96f0e45acf5b8cf6b8702da08be0a3c;p=poolifier.git test: refine expectation at back pressure callback Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/abstract-pool.test.mjs b/tests/pools/abstract-pool.test.mjs index 5dc28935..21cf10c8 100644 --- a/tests/pools/abstract-pool.test.mjs +++ b/tests/pools/abstract-pool.test.mjs @@ -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() })