From: Jérôme Benoit Date: Sat, 22 Jul 2023 02:41:16 +0000 (+0200) Subject: test: improve availableParallelism() test X-Git-Tag: v2.6.21~42^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=51c90525b0f10d2338a669036b8bea8e21046622;p=poolifier.git test: improve availableParallelism() test Signed-off-by: Jérôme Benoit --- diff --git a/tests/utils.test.js b/tests/utils.test.js index 4053a146..f5a5366d 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -14,6 +14,8 @@ const { KillBehaviors } = require('../lib/worker/worker-options') describe('Utils test suite', () => { it('Verify availableParallelism() behavior', () => { expect(typeof availableParallelism() === 'number').toBe(true) + expect(availableParallelism()).toBeGreaterThan(0) + expect(Number.isSafeInteger(availableParallelism())).toBe(true) }) it('Verify median() computation', () => {