@@ -388,17 +388,12 @@ describe("subagent announce seam flow", () => {
|
388 | 388 | |
389 | 389 | expect(didAnnounce).toBe(true); |
390 | 390 | expect(agentSpy).toHaveBeenCalledTimes(1); |
391 | | -expect(agentSpy).toHaveBeenCalledWith( |
392 | | -expect.objectContaining({ |
393 | | -method: "agent", |
394 | | -params: expect.objectContaining({ |
395 | | -sessionKey: "agent:main:main", |
396 | | -deliver: false, |
397 | | -bestEffortDeliver: true, |
398 | | -accountId: "default", |
399 | | -}), |
400 | | -}), |
401 | | -); |
| 391 | +const agentCall = agentSpy.mock.calls[0]?.[0]; |
| 392 | +expect(agentCall?.method).toBe("agent"); |
| 393 | +expect(agentCall?.params?.sessionKey).toBe("agent:main:main"); |
| 394 | +expect(agentCall?.params?.deliver).toBe(false); |
| 395 | +expect(agentCall?.params?.bestEffortDeliver).toBe(true); |
| 396 | +expect(agentCall?.params?.accountId).toBe("default"); |
402 | 397 | }); |
403 | 398 | |
404 | 399 | it("keeps nested subagent completion announces channel-less in session-only mode", async () => { |
@@ -468,13 +463,9 @@ describe("subagent announce seam flow", () => {
|
468 | 463 | expect(didAnnounce).toBe(true); |
469 | 464 | expect(agentSpy).toHaveBeenCalledTimes(1); |
470 | 465 | const agentCall = agentSpy.mock.calls[0]?.[0]; |
471 | | -expect(agentCall?.params).toEqual( |
472 | | -expect.objectContaining({ |
473 | | -deliver: true, |
474 | | -channel: "telegram", |
475 | | -accountId: "bot-123", |
476 | | -to: "-1001234567890", |
477 | | -}), |
478 | | -); |
| 466 | +expect(agentCall?.params?.deliver).toBe(true); |
| 467 | +expect(agentCall?.params?.channel).toBe("telegram"); |
| 468 | +expect(agentCall?.params?.accountId).toBe("bot-123"); |
| 469 | +expect(agentCall?.params?.to).toBe("-1001234567890"); |
479 | 470 | }); |
480 | 471 | }); |