Files
iptvnator/libs/playlist/shared
4grayandClaude Fable 5 d44045de31 test(playlist): fix flaky refresh-preparation worker-event spec (#1331)
The spec raced a fixed 160ms sleep against the service's internal
rAF + 120ms paint delay that runs before deleteXtreamPlaylistContent
is called. Under parallel jest load the sleep could win, asserting
before the mocked worker event was ever delivered. Await a deferred
resolved by the mock right after it fires onEvent instead, so the
assertion is causally ordered after the signal update.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 22:00:29 +02:00
..