From 63ee74109e28f58e591bb98204c80c87f766519c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 13 May 2026 07:18:13 +0100 Subject: [PATCH] test: dedupe ollama embedding fetch mock read --- extensions/ollama/src/embedding-provider.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/ollama/src/embedding-provider.test.ts b/extensions/ollama/src/embedding-provider.test.ts index e8979cf5893..b502628dc80 100644 --- a/extensions/ollama/src/embedding-provider.test.ts +++ b/extensions/ollama/src/embedding-provider.test.ts @@ -47,11 +47,11 @@ function mockEmbeddingFetch(embedding: number[]) { } function firstFetchInit(fetchMock: ReturnType): RequestInit | undefined { - const call = fetchMock.mock.calls.at(0); + const call = fetchMock.mock.calls[0] as unknown[] | undefined; if (!call) { throw new Error("expected embedding fetch call"); } - return call.at(1) as RequestInit | undefined; + return call[1] as RequestInit | undefined; } function readEmbeddingRequestBody(init: RequestInit | undefined): { input?: unknown } {