From f9a8fdbf5b8d0dc3077852fd69e47c4e13f725d3 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 5 Dec 2024 22:14:34 -0800 Subject: [PATCH] Simplify equality tests. --- GLOBALS.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GLOBALS.mjs b/GLOBALS.mjs index a9c6c39..187c9ca 100644 --- a/GLOBALS.mjs +++ b/GLOBALS.mjs @@ -66,13 +66,13 @@ export const assert = { }, equals: (a, b) => { if (a !== b) { - throw new Error(`${a?.constructor?.name ?? typeof a} not equal to ${b?.constructor?.name ?? typeof b}`) + throw new Error(`${a} not equal to ${b}`) } return a === b }, notEqual: (a, b) => { if (a === b) { - throw new Error(`${a?.constructor?.name ?? typeof a} equals ${b?.constructor?.name ?? typeof b}`) + throw new Error(`${a} equals ${b}`) } return a !== b }, -- 2.34.1