fix: type assertions in tts-tool test

This commit is contained in:
Hiago Silva 2026-03-16 08:59:09 -03:00 committed by GitHub
parent f83a82169b
commit 209ca50cb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,8 @@ describe("createTtsTool", () => {
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");
const firstContent = result.content[0] as { type: string; text: string };
expect(firstContent.text).toContain("requires a bound channel");
expect((result.details as Record<string, unknown>).error).toBe("no_channel");
});
});