Skip to content

Commit dc045cc

Browse files
committed
fix: use string | URL in mock fetch typing
`RequestInfo` is a DOM global; the project's tsconfig only loads ES2022 + node types, so CI typecheck failed on Node 22 even though a stale local install had picked the type up transitively.
1 parent a687a2a commit dc045cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/mock-fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const makeFetch = (
3131
routes: Partial<Record<string, MockResponse>>,
3232
): MockFetchHandle => {
3333
const calls: string[] = [];
34-
const mock = vi.fn(async (input: RequestInfo | URL) => {
34+
const mock = vi.fn(async (input: string | URL) => {
3535
const url = typeof input === "string" ? input : input.toString();
3636
calls.push(url);
3737
const pathname = new URL(url).pathname;

0 commit comments

Comments
 (0)