fix type errs
This commit is contained in:
parent
c5e8fc0395
commit
850e14bc9e
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue