(cond: boolean, msg: string)
| 13 | |
| 14 | let pass = 0, fail = 0; |
| 15 | const ok = (cond: boolean, msg: string) => { |
| 16 | if (cond) { pass++; console.log(" ✓", msg); } |
| 17 | else { fail++; console.log(" ✗", msg); } |
| 18 | }; |
| 19 | |
| 20 | // @ts-ignore — kept for debugging when tests fail |
| 21 | const hex = (b: Uint8Array, n = 32) => |