test: type the fetch mock so the MB test typechecks (tsc --noEmit clean)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user