From: Jérôme Benoit Date: Mon, 28 Aug 2023 15:58:57 +0000 (+0200) Subject: test: refine UTs X-Git-Tag: v2.6.37~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=37e31facfbf633613b566e971816892e686effaf;p=poolifier.git test: refine UTs Signed-off-by: Jérôme Benoit --- diff --git a/tests/utils.test.js b/tests/utils.test.js index fdb67478..93e9e5c2 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -57,6 +57,7 @@ describe('Utils test suite', () => { it('Verify availableParallelism() behavior', () => { const parallelism = availableParallelism() expect(typeof parallelism === 'number').toBe(true) + expect(Number.isSafeInteger(parallelism)).toBe(true) let expectedParallelism = 1 try { expectedParallelism = os.availableParallelism() @@ -64,7 +65,6 @@ describe('Utils test suite', () => { expectedParallelism = os.cpus().length } expect(parallelism).toBe(expectedParallelism) - expect(Number.isSafeInteger(parallelism)).toBe(true) }) it('Verify getWorkerType() behavior', () => {