fix type errs

This commit is contained in:
Nate 2025-07-17 22:15:26 -07:00
parent c5e8fc0395
commit 850e14bc9e

View file

@ -50,12 +50,12 @@ export async function runLlmTest(testCase: LlmTestCase) {
headers: new Headers({
"Content-Type": "text/event-stream",
}),
});
} as Response);
} else {
mockFetch.mockResolvedValue({
ok: true,
json: () => Promise.resolve(mockResponse),
});
} as Response);
}
// @ts-ignore
@ -78,7 +78,7 @@ export async function runLlmTest(testCase: LlmTestCase) {
}
expect(mockFetch).toHaveBeenCalledTimes(1);
const [url, options] = mockFetch.mock.calls[0];
const [url, options] = mockFetch.mock.calls[0] as [string, RequestInit];
expect(url.toString()).toBe(expectedRequest.url);
expect(options.method).toBe(expectedRequest.method);