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
This commit is contained in:
parent
fdc003bb3f
commit
014fc66da1
@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user