From 014fc66da14634715fd5a8cccbbb9513fab5df10 Mon Sep 17 00:00:00 2001 From: Hiago Silva <97215740+Huntterxx@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:47:37 -0300 Subject: [PATCH] test(tts): add test for missing channel fail-fast Covers the new no_channel early return when TTS tool is called without a bound delivery channel. Part of #43483 --- src/agents/tools/tts-tool.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/agents/tools/tts-tool.test.ts b/src/agents/tools/tts-tool.test.ts index fe9a6c1def9..93b0083bcf6 100644 --- a/src/agents/tools/tts-tool.test.ts +++ b/src/agents/tools/tts-tool.test.ts @@ -9,8 +9,14 @@ const { createTtsTool } = await import("./tts-tool.js"); describe("createTtsTool", () => { it("uses SILENT_REPLY_TOKEN in guidance text", () => { const tool = createTtsTool(); - expect(tool.description).toContain("QUIET_TOKEN"); expect(tool.description).not.toContain("NO_REPLY"); }); + + it("returns error when no delivery channel is available", async () => { + const tool = createTtsTool(); + const result = await tool.execute("test-call", { text: "hello world" }); + expect(result.content[0].text).toContain("requires a bound channel"); + expect(result.details.error).toBe("no_channel"); + }); });