Sara #1 + Felix #4: setTimeout(r, 50) and setTimeout(r, 5) were racing the microtask queue — passes on a fast laptop, will fail on a loaded CI runner. Replace all six occurrences with vi.waitFor(() => expect(...)) which polls until the assertion passes (default 1s timeout, 10ms interval). Tests are now deterministic — they pass the moment the condition is true, fail the moment the timeout elapses, and never spuriously time out on slow CI hardware. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 KiB
14 KiB