]> zoso.dev Git - libnemo.git/commitdiff
Simplify equality tests.
authorChris Duncan <chris@zoso.dev>
Fri, 6 Dec 2024 06:14:34 +0000 (22:14 -0800)
committerChris Duncan <chris@zoso.dev>
Fri, 6 Dec 2024 06:14:34 +0000 (22:14 -0800)
GLOBALS.mjs

index a9c6c391ef0d364d95edb0a164d1ffd3638408a9..187c9ca31a97ab10602624934a50efdb6a71a857 100644 (file)
@@ -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
        },