Skip to main content
Glama
setup.ts950 B
// Mock react-dom/test-utils to provide a working act implementation under React 19 import { vi } from 'vitest'; // Ensure React exports a working act implementation vi.mock('react', async (importOriginal) => { const actual = (await importOriginal()) as Record<string, unknown>; const act = async (callback: () => unknown | Promise<unknown>) => { const result = callback(); if (result && typeof (result as Promise<unknown>).then === 'function') { await (result as Promise<unknown>); } await Promise.resolve(); }; return { ...actual, act, }; }); // Keep test-utils import working too vi.mock('react-dom/test-utils', () => { const act = async (callback: () => unknown | Promise<unknown>) => { const result = callback(); if (result && typeof (result as Promise<unknown>).then === 'function') { await (result as Promise<unknown>); } await Promise.resolve(); }; return { act }; });

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/aymericzip/intlayer'

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