Skip to main content
Glama
by microsoft
docx.test.ts1.04 kB
import { beforeEach, describe, test } from "node:test" import assert from "node:assert/strict" import { DOCXTryParse } from "./docx" import { TestHost } from "./testhost" describe("DOCXTryParse", () => { beforeEach(() => { TestHost.install() }) test("parse DOCX to markdown", async () => { const file = "../sample/src/rag/Document.docx" const result = await DOCXTryParse(file, { format: "markdown" }) assert(result.file.content.includes("Microsoft")) }) test("parse DOCX to HTML", async () => { const file = "../sample/src/rag/Document.docx" const result = await DOCXTryParse(file, { format: "html" }) assert(result.file.content.includes("Microsoft")) }) test("cache hit", async () => { const file = "../sample/src/rag/Document.docx" const result = await DOCXTryParse(file, { format: "text" }) const result2 = await DOCXTryParse(file, { format: "text" }) assert(result2.file.content === result.file.content) }) })

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/microsoft/genaiscript'

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