You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: replace the remaining real-time sleeps in component tests with conditions or a fake clock #568
Follow-up of #546. The component suite still has real-time waits that cost wall time on every run and flake under load (the repo's own rule: "a condition is awaited with expect.poll/expect.element, never a fixed setTimeout deadline").
Where (from rg "setTimeout|Bun.sleep|waitForTimeout" packages/ui/src --glob '*.svelte.test.ts', 50 sites, ~8 s of fixed waits after #546 converted Carousel's four)
File
Waits
What it waits for
VirtualList.svelte.test.ts
100, 100, 900 ms
a scroll/prepend to settle: wait on the rendered rows or scrollTop, not a timer
MotionStage.svelte.test.ts
500 x4, 400 ms
"nothing moved" after a takeover: a fake clock (as in Carousel), or the cycle counter
A wait for something to happen: replace with the condition (expect.poll, expect.element, vi.waitFor).
A wait that proves something does not happen (the autoplay stays paused, the menu stays closed): a fake clock installed beforerender, advanced with vi.advanceTimersByTimeAsync, real timers restored before clicks and axe (see Carousel.svelte.test.ts, test: lighter suites: one pass per route, targeted local runs, machine-wide lock, native VRT #546). Keep these as assertions, do not delete them.
Activity
mvilacad commentedon Oct 25, 2026
Working on this in #603 (draft). Branch
feat/568-test-replace-the-remaining-real-time. Regression test first, then the fix.chore: start #568
feat: test: replace the remaining real-time sleeps in component tests…