X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Ffixed.test.js;h=785c6e5d2d01c8801c0e34e1d33bc292bd543347;hb=0302f8ec510bb6a67a659e7fbc415c31429dfdcc;hp=d0a0e36717b4793581045b7d93fcc1df231ab30e;hpb=a61a07243eee5cc54e7cf0d8e231202781f73f30;p=poolifier.git diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index d0a0e367..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 () => { @@ -132,8 +134,8 @@ describe('Fixed thread pool test suite', () => { it('Shutdown test', async () => { const exitPromise = TestUtils.waitExits(pool, numberOfThreads) await pool.destroy() - const res = await exitPromise - expect(res).toBe(numberOfThreads) + const numberOfExitEvents = await exitPromise + expect(numberOfExitEvents).toBe(numberOfThreads) }) it('Should work even without opts in input', async () => {