fix: satisfy ollama stream lint follow-up (openclaw#11853) thanks @BrokenFinger98

This commit is contained in:
Peter Steinberger 2026-02-14 00:58:06 +01:00
parent c1f828e7b2
commit 0a723f98e6
1 changed files with 4 additions and 1 deletions

View File

@ -274,8 +274,11 @@ describe("createOllamaStreamFn", () => {
const [url, requestInit] = fetchMock.mock.calls[0] as [string, RequestInit];
expect(url).toBe("http://ollama-host:11434/api/chat");
expect(requestInit.signal).toBe(signal);
if (typeof requestInit.body !== "string") {
throw new Error("Expected string request body");
}
const requestBody = JSON.parse(String(requestInit.body)) as {
const requestBody = JSON.parse(requestInit.body) as {
options: { num_ctx?: number; num_predict?: number };
};
expect(requestBody.options.num_ctx).toBe(131072);