From: Jérôme Benoit Date: Wed, 20 Dec 2023 14:36:17 +0000 (+0100) Subject: test: fix test expectation X-Git-Tag: v3.1.7~1^2~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=afd6e8455ea7134ae9dbdd6116565ffb482151e8;p=poolifier.git test: fix test expectation Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/abstract-pool.test.mjs b/tests/pools/abstract-pool.test.mjs index 12e1a530..1d0607fc 100644 --- a/tests/pools/abstract-pool.test.mjs +++ b/tests/pools/abstract-pool.test.mjs @@ -242,20 +242,18 @@ describe('Abstract pool test suite', () => { }) for (const [, workerChoiceStrategy] of pool.workerChoiceStrategyContext .workerChoiceStrategies) { - expect(workerChoiceStrategy.opts).toStrictEqual( - expect.objectContaining({ - retries: - pool.info.maxSize + - Object.keys(workerChoiceStrategy.opts.weights).length, - runTime: { median: false }, - waitTime: { median: false }, - elu: { median: false }, - weights: expect.objectContaining({ - 0: expect.any(Number), - [pool.info.maxSize - 1]: expect.any(Number) - }) + expect(workerChoiceStrategy.opts).toStrictEqual({ + retries: + pool.info.maxSize + + Object.keys(workerChoiceStrategy.opts.weights).length, + runTime: { median: false }, + waitTime: { median: false }, + elu: { median: false }, + weights: expect.objectContaining({ + 0: expect.any(Number), + [pool.info.maxSize - 1]: expect.any(Number) }) - ) + }) } await pool.destroy() const testHandler = () => console.info('test handler executed')