test: fix data cloning error matching
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 18 Oct 2023 17:01:20 +0000 (19:01 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 18 Oct 2023 17:01:20 +0000 (19:01 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/thread/fixed.test.mjs

index 214913d4b5f89e7b92a33fae5eb912852a80eb1f..a59609467a2b9785082b9362c23a51965a8a988b 100644 (file)
@@ -202,8 +202,8 @@ 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).toMatchObject(
+      new Error('Found invalid object in transferList')
     )
   })