(condition, label, detail)
| 61 | let passes = 0; |
| 62 | |
| 63 | function assert(condition, label, detail) { |
| 64 | if (condition) { |
| 65 | passes++; |
| 66 | console.log(` PASS ${label}`); |
| 67 | } else { |
| 68 | failures++; |
| 69 | console.error(` FAIL ${label}${detail ? ' — ' + detail : ''}`); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | function section(name) { |
| 74 | console.log(`\n=== ${name} ===`); |