Skip to main content
Glama
markmap.test.ts910 B
import { Transformer, builtInPlugins } from "markmap-lib"; import { fillTemplate } from "markmap-render"; import { describe, expect, it } from "vitest"; describe("Markmap Lib Test", () => { describe("export the markdown to HTML", () => { const testMarkdownContent = `# Test Mindmap - Topic 1 - Subtopic 1.1 - Subtopic 1.2 - Topic 2 - Subtopic 2.1 - Detail 2.1.1`; it("should return HTML string", async () => { const transformer = new Transformer([...builtInPlugins]); const { root, features } = transformer.transform(testMarkdownContent); const assets = transformer.getUsedAssets(features); const html = fillTemplate(root, assets, undefined); expect(html).toBeDefined(); expect(html).toContain("</html>"); expect(html).toContain("Test Mindmap"); }, 10000); }); });

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/jiushan-test/markmap-mcp'

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