Skip to main content
Glama

docs-mcp-server

findVersion.test.ts832 B
/** Unit test for findVersionAction */ import { Command } from "commander"; import { beforeEach, describe, expect, it, vi } from "vitest"; vi.mock("../../store", () => ({ createDocumentManagement: vi.fn(async () => ({ shutdown: vi.fn() })), })); vi.mock("../../tools", () => ({ FindVersionTool: vi .fn() .mockImplementation(() => ({ execute: vi.fn(async () => ({ version: "1.0.0" })) })), })); import { findVersionAction } from "./findVersion"; function _cmd() { return new Command(); } beforeEach(() => vi.clearAllMocks()); describe("findVersionAction", () => { it("calls FindVersionTool", async () => { await findVersionAction("react", { version: "18.x", serverUrl: undefined }); const { FindVersionTool } = await import("../../tools"); expect(FindVersionTool).toHaveBeenCalledTimes(1); }); });

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/arabold/docs-mcp-server'

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