test: assert anthropic vertex stream options · openclaw/openclaw@5b66d7f
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/anthropic-vertex
| Original file line number | Diff line number | Diff line change |
|---|
@@ -254,13 +254,12 @@ describe("createAnthropicVertexStreamFn", () => {
|
254 | 254 | |
255 | 255 | void streamFn(model, { messages: [] }, { maxTokens: Number.NaN }); |
256 | 256 | |
257 | | -expect(streamAnthropicMock).toHaveBeenCalledWith( |
258 | | -model, |
259 | | -{ messages: [] }, |
260 | | -expect.not.objectContaining({ |
261 | | -maxTokens: expect.anything(), |
262 | | -}), |
263 | | -); |
| 257 | +expect(streamAnthropicMock).toHaveBeenCalledTimes(1); |
| 258 | +const [calledModel, payload, transportOptions] = streamAnthropicMock.mock.calls[0] ?? []; |
| 259 | +expect(calledModel).toBe(model); |
| 260 | +expect(payload).toEqual({ messages: [] }); |
| 261 | +expect(transportOptions).toBeTypeOf("object"); |
| 262 | +expect(Object.hasOwn(transportOptions as object, "maxTokens")).toBe(false); |
264 | 263 | }); |
265 | 264 | }); |
266 | 265 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。