test: type the fetch mock so the MB test typechecks (tsc --noEmit clean)

This commit is contained in:
Jonathan
2026-07-11 13:15:21 +02:00
parent cdcda9e501
commit 341da71505
+1 -1
View File
@@ -9,7 +9,7 @@ afterEach(() => vi.unstubAllGlobals());
describe("musicbrainz module", () => {
it("searchArtists maps hits and sends a User-Agent", async () => {
const fetchMock = vi.fn(() =>
const fetchMock = vi.fn((_url: string, _init?: RequestInit) =>
jsonResponse({ artists: [{ id: "a1", name: "John Mayer", disambiguation: "US singer" }] }),
);
vi.stubGlobal("fetch", fetchMock);