Skip to content

Commit 6d83179

Browse files
committed
Poll browser-contract hydration probe on interval
1 parent 49b5111 commit 6d83179

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎scripts/test-browser-contracts.cjs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,11 @@ async function waitForHydrated(page) {
498498
[...document.querySelectorAll(`${SIDEBAR_NAV} a[role="button"]`)].some(
499499
(link) => link.getAttribute("href") === "#",
500500
),
501-
{ timeout: 5000 },
501+
// Interval, not the default 'raf': rAF is frame-bound and can pause under
502+
// renderer throttling; this probe is the one whose timeout selects the
503+
// network-idle fallback, so it's worth being immune to that. 100ms sits well
504+
// inside the 5s budget.
505+
{ timeout: 5000, polling: 100 },
502506
)
503507
.then(() => true)
504508
.catch(() => false);

0 commit comments

Comments
 (0)