From 347a5ff55241849be977246787e356585c03ec72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 11 Oct 2024 13:14:33 +0200 Subject: [PATCH] fix(test): use proper expectation type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- test/sequential.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sequential.test.ts b/test/sequential.test.ts index 30f10a6..5c6914c 100644 --- a/test/sequential.test.ts +++ b/test/sequential.test.ts @@ -94,7 +94,7 @@ test.each(['warmup', 'run'])('%s concurrent (task level)', async (mode) => { } else { await concurrentBench.run(); for (const result of concurrentBench.results) { - expect(result?.error).toMatch(/AssertionError/); + expect(result?.error).toMatchObject(/AssertionError/); } } expect(concurrentBench.getTask(key)!.runs).toEqual(0); @@ -107,7 +107,7 @@ test.each(['warmup', 'run'])('%s concurrent (task level)', async (mode) => { } else { await concurrentBench.runConcurrently(); for (const result of concurrentBench.results) { - expect(result?.error).toMatch(/AssertionError/); + expect(result?.error).toMatchObject(/AssertionError/); } } expect(concurrentBench.getTask(key)!.runs).toEqual(0);