From 8c6d4acf22398bf755be85612cf1e79f3dd5fbf7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 14 Aug 2023 16:44:18 +0200 Subject: [PATCH 1/1] refactor: refine pool startup error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 2 +- tests/pools/abstract/abstract-pool.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 5633613e..eb303232 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -107,7 +107,7 @@ export abstract class AbstractPool< ) { if (!this.isMain()) { throw new Error( - 'Cannot start a pool from the same worker type as the current pool one' + 'Cannot start a pool from a worker with the same type as the pool' ) } this.checkNumberOfWorkers(this.numberOfWorkers) diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 86522877..d5b10549 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -34,7 +34,7 @@ describe('Abstract pool test suite', () => { } ) ).toThrowError( - 'Cannot start a pool from the same worker type as the current pool one' + 'Cannot start a pool from a worker with the same type as the pool' ) }) -- 2.34.1