(message, info)
| 1 | |
| 2 | function throwError(message, info) { |
| 3 | const error = new Error(`AssertionError: ${ message }`); |
| 4 | error.code = "ERR_ASSERTION"; |
| 5 | for (const key in info) { error[key] = info[key]; } |
| 6 | throw error; |
| 7 | } |
| 8 | |
| 9 | export function equal(actual, expected, reason) { |
| 10 | if (actual == expected) { return; } |