| 76 | } |
| 77 | /** Print the summary and return the number of failed checks. */ |
| 78 | export function summarize(): number { |
| 79 | const failed = results.filter((r) => !r.ok); |
| 80 | console.log(`\n${'─'.repeat(60)}`); |
| 81 | console.log(`${results.length - failed.length}/${results.length} checks passed`); |
| 82 | if (failed.length) { |
| 83 | console.log('\nFailures:'); |
| 84 | for (const f of failed) { |
| 85 | console.log(` ✗ [${f.scenario}] ${f.name}${f.detail ? ` — ${f.detail}` : ''}`); |
| 86 | } |
| 87 | } |
| 88 | return failed.length; |
| 89 | } |
| 90 | |
| 91 | // ── HTTP ──────────────────────────────────────────────────────────────────── |
| 92 | export type TrackResponse = { deviceId: string; sessionId: string }; |