test: tighten voice runtime consult assertions · openclaw/openclaw@12ebb97
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
File tree
extensions/voice-call/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -356,10 +356,9 @@ describe("createVoiceCallRuntime lifecycle", () => {
|
356 | 356 | expect.objectContaining({ name: "custom_tool" }), |
357 | 357 | ], |
358 | 358 | }); |
359 | | -expect(mocks.realtimeHandlerRegisterToolHandler).toHaveBeenCalledWith( |
360 | | -"openclaw_agent_consult", |
361 | | -expect.any(Function), |
362 | | -); |
| 359 | +const registeredToolHandler = mocks.realtimeHandlerRegisterToolHandler.mock.calls[0]; |
| 360 | +expect(registeredToolHandler?.[0]).toBe("openclaw_agent_consult"); |
| 361 | +expect(registeredToolHandler?.[1]).toBeTypeOf("function"); |
363 | 362 | |
364 | 363 | const handler = mocks.realtimeHandlerRegisterToolHandler.mock.calls[0]?.[1] as |
365 | 364 | | (( |
@@ -528,7 +527,12 @@ describe("createVoiceCallRuntime lifecycle", () => {
|
528 | 527 | sources: ["memory"], |
529 | 528 | timeoutMs: 800, |
530 | 529 | }, |
531 | | -logger: expect.any(Object), |
| 530 | +logger: { |
| 531 | +info: console.log, |
| 532 | +warn: console.warn, |
| 533 | +error: console.error, |
| 534 | +debug: console.debug, |
| 535 | +}, |
532 | 536 | sessionKey: "voice:15550001234", |
533 | 537 | }); |
534 | 538 | expect(runEmbeddedPiAgent).not.toHaveBeenCalled(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。