@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 23 lines 646 Bytes
Raw
1 import { describe, expect, it } from "@effect/vitest";
2 import { mcpToolPresentation } from "./mcpToolPresentation.ts";
3
4 describe("mcpToolPresentation", () => {
5 it.each([
6 "javascript:alert(1)",
7 "file:///tmp/logo.png",
8 "not a URL",
9 "https://example.com/" + "x".repeat(4096),
10 ])("ignores an invalid logo %s", (iconUrl) => {
11 expect(
12 mcpToolPresentation({
13 serverName: "weather",
14 toolName: "get_weather",
15 iconUrl,
16 title: "x".repeat(161),
17 }),
18 ).toEqual({
19 title: "get weather",
20 toolSource: { key: "mcp:weather", name: "weather", kind: "integration" },
21 });
22 });
23 });