test: dedupe anthropic vertex mock reads · openclaw/openclaw@87109e5
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
File tree
extensions/anthropic-vertex
| Original file line number | Diff line number | Diff line change |
|---|
@@ -45,7 +45,7 @@ const CACHE_BOUNDARY_PROMPT = `Stable prefix${SYSTEM_PROMPT_CACHE_BOUNDARY}Dynam
|
45 | 45 | type PayloadHook = (payload: unknown, payloadModel: unknown) => Promise<unknown>; |
46 | 46 | |
47 | 47 | function streamAnthropicCall(streamAnthropicMock: ReturnType<typeof vi.fn>): unknown[] { |
48 | | -const call = streamAnthropicMock.mock.calls.at(0); |
| 48 | +const call = streamAnthropicMock.mock.calls[0]; |
49 | 49 | if (!call) { |
50 | 50 | throw new Error("Expected streamAnthropic call"); |
51 | 51 | } |
@@ -55,7 +55,7 @@ function streamAnthropicCall(streamAnthropicMock: ReturnType<typeof vi.fn>): unk
|
55 | 55 | function streamTransportOptions( |
56 | 56 | streamAnthropicMock: ReturnType<typeof vi.fn>, |
57 | 57 | ): Record<string, unknown> { |
58 | | -const options = streamAnthropicCall(streamAnthropicMock).at(2); |
| 58 | +const options = streamAnthropicCall(streamAnthropicMock)[2]; |
59 | 59 | if (!options || typeof options !== "object") { |
60 | 60 | throw new Error("Expected streamAnthropic transport options"); |
61 | 61 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。