Skip to main content
Glama
setup-e2e.ts652 B
/** * Setup file for e2e tests that use the mock server. * * This setup is separate from the main test/setup.ts to ensure that * unit tests don't unnecessarily load the mock server infrastructure. */ import { afterAll, afterEach, beforeAll } from "vitest"; import { vi } from "vitest"; import { server } from "./mock-server"; vi.mock("../src/utils/logger"); // Start mock server before all tests beforeAll(() => { server.listen({ onUnhandledRequest: "warn" }); }); // Reset handlers after each test to ensure test isolation afterEach(() => { server.resetHandlers(); }); // Clean up after all tests afterAll(() => { server.close(); });

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

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