From 1cc6e9ef64f399f4ca58da8079ef72a011ac4227 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 3 Oct 2023 21:22:17 +0200 Subject: [PATCH] test: fix async/await imbalance MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/pools/cluster/fixed.test.mjs | 2 +- tests/pools/thread/fixed.test.mjs | 2 +- tests/worker/abstract-worker.test.mjs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/pools/cluster/fixed.test.mjs b/tests/pools/cluster/fixed.test.mjs index 7d829f32..4471f513 100644 --- a/tests/pools/cluster/fixed.test.mjs +++ b/tests/pools/cluster/fixed.test.mjs @@ -318,7 +318,7 @@ describe('Fixed cluster pool test suite', () => { await pool.destroy() }) - it('Verify that a pool with zero worker fails', async () => { + it('Verify that a pool with zero worker fails', () => { expect( () => new FixedClusterPool(0, './tests/worker-files/cluster/testWorker.js') diff --git a/tests/pools/thread/fixed.test.mjs b/tests/pools/thread/fixed.test.mjs index 3969c83a..fd7f5935 100644 --- a/tests/pools/thread/fixed.test.mjs +++ b/tests/pools/thread/fixed.test.mjs @@ -338,7 +338,7 @@ describe('Fixed thread pool test suite', () => { await pool.destroy() }) - it('Verify that a pool with zero worker fails', async () => { + it('Verify that a pool with zero worker fails', () => { expect( () => new FixedThreadPool(0, './tests/worker-files/thread/testWorker.mjs') ).toThrowError('Cannot instantiate a fixed pool with zero worker') diff --git a/tests/worker/abstract-worker.test.mjs b/tests/worker/abstract-worker.test.mjs index e15f60a5..df844eef 100644 --- a/tests/worker/abstract-worker.test.mjs +++ b/tests/worker/abstract-worker.test.mjs @@ -179,7 +179,7 @@ describe('Abstract worker test suite', () => { it('Verify that async kill handler is called when worker is killed', () => { const killHandlerStub = stub().returns() const worker = new ClusterWorker(() => {}, { - killHandler: async () => Promise.resolve(killHandlerStub()) + killHandler: async () => await Promise.resolve(killHandlerStub()) }) worker.isMain = false worker.handleKillMessage() -- 2.34.1