From: Chris Duncan Date: Fri, 6 Dec 2024 06:14:34 +0000 (-0800) Subject: Simplify equality tests. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=f9a8fdbf5b8d0dc3077852fd69e47c4e13f725d3;p=libnemo.git Simplify equality tests. --- 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 },