From: Jérôme Benoit Date: Mon, 28 Oct 2024 11:52:19 +0000 (+0100) Subject: test: refine some test expectations X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7045f62e8115936329079d6ba3c6df96db85ca42;p=poolifier.git test: refine some test expectations Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/worker-node.test.mjs b/tests/pools/worker-node.test.mjs index 8698680f..42eb4434 100644 --- a/tests/pools/worker-node.test.mjs +++ b/tests/pools/worker-node.test.mjs @@ -212,7 +212,7 @@ describe('Worker node test suite', () => { } ) ).toThrow( - new RangeError( + new TypeError( 'Cannot construct a worker node without a tasks queue priority option' ) ) @@ -228,7 +228,7 @@ describe('Worker node test suite', () => { } ) ).toThrow( - new RangeError( + new TypeError( 'Cannot construct a worker node with a tasks queue priority option that is not a boolean' ) ) @@ -361,7 +361,7 @@ describe('Worker node test suite', () => { expect(() => threadWorkerNode.getTaskFunctionWorkerUsage('invalidTaskFunction') ).toThrow( - new TypeError( + new Error( "Cannot get task function worker usage for task function name 'invalidTaskFunction' when task function properties list is not yet defined" ) ) @@ -372,7 +372,7 @@ describe('Worker node test suite', () => { expect(() => threadWorkerNode.getTaskFunctionWorkerUsage('invalidTaskFunction') ).toThrow( - new TypeError( + new Error( "Cannot get task function worker usage for task function name 'invalidTaskFunction' when task function properties list has less than 3 elements" ) )