Skip to main content
Glama
documentation.test.ts1.33 kB
import { describe, it, expect } from "vitest"; import { generateDocumentationHandler } from "./documentation.js"; describe("Documentation Tools", () => { describe("generate_documentation", () => { it("should generate all documentation types by default", () => { const result = generateDocumentationHandler({ projectPath: "./", outputDir: "docs", }); const text = result.content[0].text; const files = result.content[0].artifacts; expect(text).toContain("Generated 3 documentation files"); expect(files).toHaveLength(3); expect(files[0].name).toContain("architecture.md"); }); it("should extract architecture documentation", () => { const result = generateDocumentationHandler({ projectPath: "./", focus: "architecture", }); const file = result.content[0].artifacts[0]; expect(file.content).toContain("# System Architecture"); expect(file.content).toContain("Overview"); }); it("should extract api documentation", () => { const result = generateDocumentationHandler({ projectPath: "./", focus: "api", }); const file = result.content[0].artifacts[0]; expect(file.content).toContain("# API Reference"); expect(file.content).toContain("Tools"); }); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/millsydotdev/Code-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server