mirror of
https://github.com/block/buzz.git
synced 2026-11-02 15:31:27 +00:00
chore(relay-reconnect): fix biome formatting in sidebar-relay-card spec
Collapse waitForFunction arrow style to match biome's expected format (remove trailing comma wrapping around the callback). Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
parent
3f7723428e
commit
a978e1b8bb
@@ -44,19 +44,17 @@ async function setRelayConnectionState(
|
||||
// first. Without this guard, the mock relay's async auth handshake (started
|
||||
// on page load) can race the override and set state back to "connected"
|
||||
// after we've driven it to a degraded value.
|
||||
await page.waitForFunction(
|
||||
() => {
|
||||
const win = window as Window & {
|
||||
__BUZZ_E2E_GET_RELAY_CONNECTION_STATE__?: () => string;
|
||||
__BUZZ_E2E_SET_RELAY_CONNECTION_STATE__?: unknown;
|
||||
};
|
||||
return (
|
||||
typeof win.__BUZZ_E2E_SET_RELAY_CONNECTION_STATE__ === "function" &&
|
||||
typeof win.__BUZZ_E2E_GET_RELAY_CONNECTION_STATE__ === "function" &&
|
||||
win.__BUZZ_E2E_GET_RELAY_CONNECTION_STATE__() === "connected"
|
||||
);
|
||||
},
|
||||
);
|
||||
await page.waitForFunction(() => {
|
||||
const win = window as Window & {
|
||||
__BUZZ_E2E_GET_RELAY_CONNECTION_STATE__?: () => string;
|
||||
__BUZZ_E2E_SET_RELAY_CONNECTION_STATE__?: unknown;
|
||||
};
|
||||
return (
|
||||
typeof win.__BUZZ_E2E_SET_RELAY_CONNECTION_STATE__ === "function" &&
|
||||
typeof win.__BUZZ_E2E_GET_RELAY_CONNECTION_STATE__ === "function" &&
|
||||
win.__BUZZ_E2E_GET_RELAY_CONNECTION_STATE__() === "connected"
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// When driving to "connected", just wait for the seam to be installed —
|
||||
// no need to gate on the current state since we're overriding it directly.
|
||||
|
||||
Reference in New Issue
Block a user