From: Jérôme Benoit Date: Sat, 26 Aug 2023 19:59:26 +0000 (+0200) Subject: test: add pool statuses test X-Git-Tag: v2.6.36~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bc61cfe6fbcaf4808ce7442a74d5dc29fbb114da;p=poolifier.git test: add pool statuses test Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 37729cee..ddb0534f 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -44,6 +44,17 @@ describe('Abstract pool test suite', () => { ) }) + it('Verify that pool statuses properties are set', async () => { + const pool = new FixedThreadPool( + numberOfWorkers, + './tests/worker-files/thread/testWorker.js' + ) + expect(pool.starting).toBe(false) + expect(pool.started).toBe(true) + await pool.destroy() + expect(pool.started).toBe(false) + }) + it('Verify that filePath is checked', () => { const expectedError = new Error( 'Please specify a file with a worker implementation'