})
for (const [, workerChoiceStrategy] of pool.workerChoiceStrategyContext
.workerChoiceStrategies) {
- 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)
+ 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)
+ // })
})
- })
+ )
}
await pool.destroy()
const testHandler = () => console.info('test handler executed')