Merge branch 'fix/ci-list-return-timing'

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hectorqinandClaude Opus 5.5 committed 2026-11-01 00:20:11 +00:00
commit b58d2bc554
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -62,7 +62,9 @@ function mount(entry: string) {
));
}
async function settle(done: () => boolean) {
for (let i = 0; i < 50 && !done(); i++) await act(async () => { await new Promise(resolve => setTimeout(resolve, 10)); });
// Up to 4s rather than 50 polls: a slow CI runner's first render alone can take over half a second.
const deadline = Date.now() + 4000;
while (!done() && Date.now() < deadline) await act(async () => { await new Promise(resolve => setTimeout(resolve, 10)); });
expect(done()).toBe(true);
}
const prefer = (patch: Partial<MediaPreferences>) => saveMediaPreferences(scope, { density: 'compact', showContinue: true, showLibraryName: true, ...patch });
+3 -1
View File
@@ -50,8 +50,10 @@ function mount(initial: string) {
return router;
}
/** Polls until `done` holds, for up to 4s: a slow CI runner's first render alone can take over half a second. */
async function settle(done: () => boolean) {
for (let i = 0; i < 50 && !done(); i++) await act(async () => { await new Promise(resolve => setTimeout(resolve, 10)); });
const deadline = Date.now() + 4000;
while (!done() && Date.now() < deadline) await act(async () => { await new Promise(resolve => setTimeout(resolve, 10)); });
expect(done()).toBe(true);
}
const screen = () => root.querySelector<HTMLElement>('.media-screen')!;