Download tests/mcp.test.ts from hongcoding/agentlens: direct link, hf CLI and curl.
- Browser
- Download file 674 Bytes
-
https://huggingface.co/datasets/hongcoding/agentlens/resolve/main/tests/mcp.test.ts
- Command line
-
hf download hf://datasets/hongcoding/agentlens/tests/mcp.test.ts
-
curl -L -o mcp.test.ts https://huggingface.co/datasets/hongcoding/agentlens/resolve/main/tests/mcp.test.ts
674 Bytes
| import { describe, it, expect } from "vitest"; | |
| import { createMcpServer } from "../src/mcp/server.js"; | |
| describe("MCP Server", () => { | |
| it("creates server with correct metadata", () => { | |
| const server = createMcpServer(); | |
| expect(server).toBeDefined(); | |
| }); | |
| it("registers all expected tools", () => { | |
| const server = createMcpServer(); | |
| // Access the internal tool registry to verify tools are registered | |
| // The McpServer object stores registered tools | |
| const serverAny = server as any; | |
| // Tools are registered via server.tool() calls | |
| // We verify the server object is functional | |
| expect(typeof server.connect).toBe("function"); | |
| }); | |
| }); | |