test: dedupe clickclack inbound mock reads · openclaw/openclaw@0f7b1c5
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
File tree
extensions/clickclack/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -127,14 +127,14 @@ describe("handleClickClackInbound", () => {
|
127 | 127 | |
128 | 128 | expect(runtime.channel.turn.runPrepared).not.toHaveBeenCalled(); |
129 | 129 | expect(runtime.agent.runEmbeddedPiAgent).not.toHaveBeenCalled(); |
130 | | -const completionRequest = (runtime.llm.complete as LlmCompleteMock).mock.calls.at(0)?.[0]; |
| 130 | +const completionRequest = (runtime.llm.complete as LlmCompleteMock).mock.calls[0]?.[0]; |
131 | 131 | expect(completionRequest?.agentId).toBe("service-bot"); |
132 | 132 | expect(completionRequest?.model).toBe("openai/gpt-5.4-mini"); |
133 | 133 | expect(completionRequest?.maxTokens).toBe(96); |
134 | 134 | expect(completionRequest?.purpose).toBe("clickclack bot reply"); |
135 | 135 | expect(completionRequest?.messages).toEqual([{ role: "user", content: "hello bot" }]); |
136 | 136 | |
137 | | -const sendRequest = sendClickClackTextMock.mock.calls.at(0)?.[0]; |
| 137 | +const sendRequest = sendClickClackTextMock.mock.calls[0]?.[0]; |
138 | 138 | expect(sendRequest?.accountId).toBe("service"); |
139 | 139 | expect(sendRequest?.to).toBe("channel:chn_1"); |
140 | 140 | expect(sendRequest?.text).toBe("service bot online"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。