fix invalid typing in mock-fetch

This commit is contained in:
zkldi
2021-05-20 08:07:32 +01:00
parent b40c81bf33
commit d9b396cd7a
+3 -2
View File
@@ -1,7 +1,8 @@
import nodeFetch, { Response } from "node-fetch";
import { Response } from "node-fetch";
import { NodeFetch } from "../fetch";
export function MockFetch(data: Partial<Response>) {
// We know! this is a mock function.
// eslint-disable-next-line require-await
return ((async () => data) as unknown) as typeof nodeFetch;
return ((async () => data) as unknown) as NodeFetch;
}