test: dedupe ollama embedding fetch mock read · openclaw/openclaw@63ee741
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -47,11 +47,11 @@ function mockEmbeddingFetch(embedding: number[]) {
|
47 | 47 | } |
48 | 48 | |
49 | 49 | function firstFetchInit(fetchMock: ReturnType<typeof mockEmbeddingFetch>): RequestInit | undefined { |
50 | | -const call = fetchMock.mock.calls.at(0); |
| 50 | +const call = fetchMock.mock.calls[0] as unknown[] | undefined; |
51 | 51 | if (!call) { |
52 | 52 | throw new Error("expected embedding fetch call"); |
53 | 53 | } |
54 | | -return call.at(1) as RequestInit | undefined; |
| 54 | +return call[1] as RequestInit | undefined; |
55 | 55 | } |
56 | 56 | |
57 | 57 | function readEmbeddingRequestBody(init: RequestInit | undefined): { input?: unknown } { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。