(s: { elapsedMs: number; text: string | undefined })
| 121 | } |
| 122 | |
| 123 | const onSample = (s: { elapsedMs: number; text: string | undefined }) => { |
| 124 | const text = s.text ?? ""; |
| 125 | const balanced = isBalanced(text); |
| 126 | samples.push({ |
| 127 | elapsedMs: s.elapsedMs, |
| 128 | balanced, |
| 129 | len: text.length, |
| 130 | preview: text.slice(0, 100), |
| 131 | // Capture full text for unbalanced samples so we can diagnose without |
| 132 | // having to re-run. Skipped for balanced samples to keep reports small. |
| 133 | ...(text.length > 0 && !balanced ? { full: text } : {}), |
| 134 | }); |
| 135 | }; |
| 136 | |
| 137 | if (interruptTimer === undefined) { |
| 138 | /* no-op */ |
nothing calls this directly
no test coverage detected