From: Jérôme Benoit Date: Sat, 8 Oct 2022 13:23:33 +0000 (+0200) Subject: Check in UTs the error message thrown in worker-thread pool X-Git-Tag: v2.2.1~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0302f8ec510bb6a67a659e7fbc415c31429dfdcc;p=poolifier.git Check in UTs the error message thrown in worker-thread pool Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index 763e3f88..785c6e5d 100644 --- a/tests/pools/thread/fixed.test.js +++ b/tests/pools/thread/fixed.test.js @@ -103,6 +103,7 @@ describe('Fixed thread pool test suite', () => { expect(inError).toBeInstanceOf(Error) expect(inError.message).toBeDefined() expect(typeof inError.message === 'string').toBe(true) + expect(inError.message).toBe('Error Message from ThreadWorker') }) it('Verify that error handling is working properly:async', async () => { @@ -117,6 +118,7 @@ describe('Fixed thread pool test suite', () => { expect(inError).toBeInstanceOf(Error) expect(inError.message).toBeDefined() expect(typeof inError.message === 'string').toBe(true) + expect(inError.message).toBe('Error Message from ThreadWorker:async') }) it('Verify that async function is working properly', async () => {