test: fix for node.js 21.x
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 18 Oct 2023 17:18:26 +0000 (19:18 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 18 Oct 2023 17:18:26 +0000 (19:18 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/thread/fixed.test.mjs

index a59609467a2b9785082b9362c23a51965a8a988b..fc68fdb23a01a163e33d532d0dd8a1a27b1781ea 100644 (file)
@@ -202,8 +202,9 @@ describe('Fixed thread pool test suite', () => {
       error = e
     }
     expect(result).toStrictEqual({ ok: 1 })
-    expect(error).toMatchObject(
-      new Error('Found invalid object in transferList')
+    expect(error).toBeInstanceOf(Error)
+    expect(error.message).toMatch(
+      /Found invalid (object|value) in transferList/
     )
   })