* Assert hooks fired by comparing telemetry before/after. * Returns array of hook assertion strings that failed, or empty if all pass.
(tmpDir, before)
| 595 | * Returns array of hook assertion strings that failed, or empty if all pass. |
| 596 | */ |
| 597 | function assertHooksFired(tmpDir, before) { |
| 598 | const after = snapshotTelemetry(tmpDir); |
| 599 | const failures = []; |
| 600 | if (after.timing <= before.timing) failures.push('hook-timing.jsonl did not grow (hooks may not have fired)'); |
| 601 | if (after.errors > before.errors) failures.push(`${after.errors - before.errors} new hook error(s) — check hook-errors.log`); |
| 602 | return failures; |
| 603 | } |
| 604 | |
| 605 | // ── Claude CLI detection ────────────────────────────────────────────────────── |
| 606 |
no test coverage detected