chore: chore: Fix types in tests 12/N.

This commit is contained in:
cpojer
2026-02-17 11:17:45 +09:00
parent e02feaff83
commit 262b7a157a
7 changed files with 107 additions and 90 deletions

View File

@@ -13,7 +13,7 @@ const toRequestUrl = (input: Parameters<typeof fetch>[0]): string =>
const createAntigravityFetch = (
handler: (url: string, init?: Parameters<typeof fetch>[1]) => Promise<Response> | Response,
) =>
vi.fn<Parameters<typeof fetch>, ReturnType<typeof fetch>>(async (input, init) =>
vi.fn(async (input: string | Request | URL, init?: RequestInit) =>
handler(toRequestUrl(input), init),
);
@@ -38,7 +38,7 @@ function createEndpointFetch(spec: {
}
async function runUsage(mockFetch: ReturnType<typeof createAntigravityFetch>) {
return fetchAntigravityUsage("token-123", 5000, mockFetch);
return fetchAntigravityUsage("token-123", 5000, mockFetch as unknown as typeof fetch);
}
function findWindow(snapshot: Awaited<ReturnType<typeof fetchAntigravityUsage>>, label: string) {