From e4d62c21be2f5454749d1a22b11f8f2dd6594d7f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 26 Feb 2026 04:15:04 +0100 Subject: [PATCH] test: expand voice provider tts regression coverage --- ...-style-aliases-schemas-without-dropping.test.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping.test.ts b/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping.test.ts index 4f2b0be9f47..e074b6f9189 100644 --- a/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping.test.ts +++ b/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping.test.ts @@ -319,10 +319,18 @@ describe("createOpenClawCodingTools", () => { expect(names.has("telegram")).toBe(false); expect(names.has("whatsapp")).toBe(false); }); - it("does not expose tts tool for voice message provider", () => { - const tools = createOpenClawCodingTools({ messageProvider: "voice" }); + it.each(["voice", "VOICE", " Voice "])( + "does not expose tts tool for normalized voice message provider: %s", + (messageProvider) => { + const tools = createOpenClawCodingTools({ messageProvider }); + const names = new Set(tools.map((tool) => tool.name)); + expect(names.has("tts")).toBe(false); + }, + ); + it("keeps tts tool for non-voice providers", () => { + const tools = createOpenClawCodingTools({ messageProvider: "discord" }); const names = new Set(tools.map((tool) => tool.name)); - expect(names.has("tts")).toBe(false); + expect(names.has("tts")).toBe(true); }); it("filters session tools for sub-agent sessions by default", () => { const tools = createOpenClawCodingTools({