From 2f8a9c2d7454ee828cb2eb40073116f186a5f726 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 2 Aug 2025 01:53:13 -0700 Subject: [PATCH] Fix assertions for expected failures. --- test/GLOBALS.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/GLOBALS.mjs b/test/GLOBALS.mjs index cb2f957..863c60f 100644 --- a/test/GLOBALS.mjs +++ b/test/GLOBALS.mjs @@ -228,10 +228,10 @@ export const assert = { if (fn instanceof Promise) { try { await fn - throw new Error(msg ?? 'expected async function to reject') } catch (err) { return true } + throw new Error(msg ?? 'expected async function to reject') } else { throw new Error(msg ?? 'expected async function') } @@ -260,9 +260,9 @@ export const assert = { } try { fn() - throw new Error(msg ?? `expected function to throw an exception`) } catch (err) { return true } + throw new Error(msg ?? `expected function to throw an exception`) } } -- 2.47.3