(a, b, msg)
| 1942 | if (!condition) throw new Error(msg || "assertion failed"); |
| 1943 | } |
| 1944 | function assertEq(a, b, msg) { |
| 1945 | if (a !== b) throw new Error(msg ? `${msg}: expected ${b}, got ${a}` : `expected ${b}, got ${a}`); |
| 1946 | } |
| 1947 | function assertDeepEq(a, b, msg) { |
| 1948 | const aj = JSON.stringify(a); |
| 1949 | const bj = JSON.stringify(b); |