Skip to main content
Glama
jest.setup.mjs•1.04 kB
// Jest setup file for global test configuration import { jest, afterEach } from '@jest/globals'; // Set test environment variables process.env.NODE_ENV = 'test'; process.env.PERSONAS_DIR = 'test-personas'; // FIX: Global teardown handling to prevent Jest environment teardown errors // This ensures all pending async operations complete before Jest tears down // Using multiple approaches for robustness across platforms (especially Windows) afterEach(async () => { // Multiple event loop flushes to ensure ALL pending operations complete await new Promise(resolve => setImmediate(resolve)); await new Promise(resolve => setImmediate(resolve)); // Add a small delay to ensure file system operations complete (Windows needs this) await new Promise(resolve => setTimeout(resolve, 50)); // Final flush await new Promise(resolve => setImmediate(resolve)); }); // Increase global test timeout to prevent premature teardown // This is especially important for tests with file system operations jest.setTimeout(30000); // 30 seconds

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

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