Files
MealQuest/web
dev_agentandClaude Opus 5.5 433ff388e0
CI / ci (push) Successful in 8m11s
CI / ci (pull_request) Successful in 8m12s
Drive the offline-queue tests by event-loop turns, not real time
The tests still waited on real time: the 20 ms and 50 ms pauses behind the
"nothing more is sent" checks, Testing Library's waits (a real setInterval
and a real end-of-wait setTimeout), and React Query's notices on a real
setTimeout of 0. Under load, whether the ordered-replay check saw a PATCH
sent too soon depended on when a real timer fired.

The tests now wait with until, which lets the page take turns of the event
loop (setImmediate inside act) until a check passes, and settle, which lets
it take a fixed number of turns before a "nothing more happens" check. No
time passes in either, real or fake. React Query's notices go out a turn
later on setImmediate, and advance moves the fake clock synchronously. The
Testing Library wait wrapper override is gone. The replay assertions are
unchanged.

Task 880e924e-c248-472f-8e92-1baec5b4cc9f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:47:09 -04:00
..