From: Jérôme Benoit Date: Fri, 28 Jul 2023 11:12:19 +0000 (+0200) Subject: refactor: refine error message X-Git-Tag: v2.6.21~16 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d640b48b5d9b82323217b887d381f9f3740e4fe9;p=poolifier.git refactor: refine error message Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 30b4d01f..57c50861 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -186,7 +186,7 @@ export abstract class AbstractPool< ) } else if (max === 0) { throw new RangeError( - 'Cannot instantiate a dynamic pool with a pool size equal to zero' + 'Cannot instantiate a dynamic pool with a maximum pool size equal to zero' ) } else if (min === max) { throw new RangeError( diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 5ac704a6..af167214 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -147,7 +147,7 @@ describe('Abstract pool test suite', () => { new DynamicThreadPool(0, 0, './tests/worker-files/thread/testWorker.js') ).toThrowError( new RangeError( - 'Cannot instantiate a dynamic pool with a pool size equal to zero' + 'Cannot instantiate a dynamic pool with a maximum pool size equal to zero' ) ) })