test: fix fetch mock typing

This commit is contained in:
Peter Steinberger
2026-03-15 21:07:05 -07:00
parent 53ccc78c63
commit 0f43dc4680
4 changed files with 21 additions and 16 deletions

View File

@@ -293,7 +293,7 @@ describe("wrapFetchWithAbortSignal", () => {
});
it("exposes a no-op preconnect when the source fetch has none", () => {
const fetchImpl = vi.fn(async () => ({ ok: true }) as Response) as typeof fetch;
const fetchImpl = withFetchPreconnect(vi.fn(async () => ({ ok: true }) as Response));
const wrapped = wrapFetchWithAbortSignal(fetchImpl) as typeof fetch & {
preconnect: (url: string, init?: { credentials?: RequestCredentials }) => unknown;
};