X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fpools%2Fthread%2Ffixed.test.mjs;h=fc68fdb23a01a163e33d532d0dd8a1a27b1781ea;hb=05132b129c331aeec41f5878d58456675e00dbd4;hp=3969c83ad7464c728d7df33dd092673c16384734;hpb=b2fd3f4a217ac09110da00b3b65dcdd36de4bf74;p=poolifier.git diff --git a/tests/pools/thread/fixed.test.mjs b/tests/pools/thread/fixed.test.mjs index 3969c83a..fc68fdb2 100644 --- a/tests/pools/thread/fixed.test.mjs +++ b/tests/pools/thread/fixed.test.mjs @@ -202,8 +202,9 @@ describe('Fixed thread pool test suite', () => { error = e } expect(result).toStrictEqual({ ok: 1 }) - expect(error).toStrictEqual( - new TypeError('Found invalid object in transferList') + expect(error).toBeInstanceOf(Error) + expect(error.message).toMatch( + /Found invalid (object|value) in transferList/ ) }) @@ -338,9 +339,9 @@ 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') + ).toThrow('Cannot instantiate a fixed pool with zero worker') }) })