mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:24:30 +00:00
test: expand voice provider tts regression coverage
This commit is contained in:
@@ -319,10 +319,18 @@ describe("createOpenClawCodingTools", () => {
|
|||||||
expect(names.has("telegram")).toBe(false);
|
expect(names.has("telegram")).toBe(false);
|
||||||
expect(names.has("whatsapp")).toBe(false);
|
expect(names.has("whatsapp")).toBe(false);
|
||||||
});
|
});
|
||||||
it("does not expose tts tool for voice message provider", () => {
|
it.each(["voice", "VOICE", " Voice "])(
|
||||||
const tools = createOpenClawCodingTools({ messageProvider: "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));
|
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", () => {
|
it("filters session tools for sub-agent sessions by default", () => {
|
||||||
const tools = createOpenClawCodingTools({
|
const tools = createOpenClawCodingTools({
|
||||||
|
|||||||
Reference in New Issue
Block a user