test: count verbose tool result callbacks · openclaw/openclaw@630bbbd
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -338,7 +338,7 @@ describe("subscribeEmbeddedPiSession", () => {
|
338 | 338 | }); |
339 | 339 | |
340 | 340 | await vi.waitFor(() => { |
341 | | -expect(onToolResult).toHaveBeenCalled(); |
| 341 | +expect(onToolResult).toHaveBeenCalledTimes(2); |
342 | 342 | }); |
343 | 343 | const payload = onToolResult.mock.calls.at(-1)?.[0] as |
344 | 344 | | { text?: string; mediaUrls?: string[] } |
@@ -380,7 +380,7 @@ describe("subscribeEmbeddedPiSession", () => {
|
380 | 380 | }); |
381 | 381 | |
382 | 382 | await vi.waitFor(() => { |
383 | | -expect(onToolResult).toHaveBeenCalled(); |
| 383 | +expect(onToolResult).toHaveBeenCalledTimes(2); |
384 | 384 | }); |
385 | 385 | const toolPayload = onToolResult.mock.calls.at(-1)?.[0] as |
386 | 386 | | { text?: string; mediaUrls?: string[] } |
@@ -438,7 +438,7 @@ describe("subscribeEmbeddedPiSession", () => {
|
438 | 438 | }); |
439 | 439 | |
440 | 440 | await vi.waitFor(() => { |
441 | | -expect(onToolResult).toHaveBeenCalled(); |
| 441 | +expect(onToolResult).toHaveBeenCalledTimes(2); |
442 | 442 | }); |
443 | 443 | |
444 | 444 | emit({ type: "message_start", message: { role: "assistant" } }); |
@@ -492,7 +492,7 @@ describe("subscribeEmbeddedPiSession", () => {
|
492 | 492 | }); |
493 | 493 | |
494 | 494 | await vi.waitFor(() => { |
495 | | -expect(onToolResult).toHaveBeenCalled(); |
| 495 | +expect(onToolResult).toHaveBeenCalledTimes(2); |
496 | 496 | }); |
497 | 497 | |
498 | 498 | emit({ type: "message_start", message: { role: "assistant" } }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。