Skip to main content
Glama

hypertool-mcp

test-setup.tsโ€ข2.46 kB
/** * Global test setup for Vitest * Mocks the logging module to prevent file I/O during tests * but still outputs to stdout for visibility using real Pino */ import { vi } from "vitest"; import pino from "pino"; // Mock the logging module to prevent file I/O during tests // but use a real Pino logger configured for console output only vi.mock("./utils/logging.js", () => { // Create a minimal test logger for better performance // IMPORTANT: Do not use transports here as they add exit listeners const testLogger = pino({ level: process.env.TEST_VERBOSE ? "info" : "silent", // Silent unless explicitly verbose // No transport - write directly to stdout to avoid exit listeners }); const mockLogger = { info: testLogger.info.bind(testLogger), warn: testLogger.warn.bind(testLogger), error: testLogger.error.bind(testLogger), debug: testLogger.debug.bind(testLogger), trace: testLogger.trace.bind(testLogger), child: (bindings: any) => { const childLogger = testLogger.child(bindings); return { info: childLogger.info.bind(childLogger), warn: childLogger.warn.bind(childLogger), error: childLogger.error.bind(childLogger), debug: childLogger.debug.bind(childLogger), trace: childLogger.trace.bind(childLogger), child: mockLogger.child, pino: childLogger, updateConfig: vi.fn(), }; }, pino: testLogger, updateConfig: vi.fn(), }; return { Logger: vi.fn(() => mockLogger), getLogger: vi.fn(() => mockLogger), getLoggerAsync: vi.fn(async () => mockLogger), createChildLogger: vi.fn((bindings) => mockLogger.child(bindings)), createChildLoggerAsync: vi.fn(async (bindings) => mockLogger.child(bindings) ), DEFAULT_LOGGING_CONFIG: { level: "info", enableConsole: true, enableFile: false, serverName: "test", format: "pretty", }, createLoggingConfig: vi.fn(() => ({ level: "info", enableConsole: true, enableFile: false, serverName: "test", format: "pretty", })), getLoggerDiagnostics: vi.fn(() => ({ hasGlobalLogger: true, implementationType: "pino", cacheStats: { childLoggerCount: 0, cacheSize: 0, cacheKeys: [], }, })), resetGlobalLogger: vi.fn(), forceSetMcpLoggerEnabled: vi.fn(), getActiveLoggingConfig: vi.fn(() => null), }; });

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/toolprint/hypertool-mcp'

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