Skip to main content
Glama
setup.ts•793 B
import { beforeAll, afterAll, beforeEach, afterEach } from 'vitest'; import nock from 'nock'; // Setup global test environment beforeAll(() => { // Set test environment variables process.env.CLOCKIFY_API_KEY = 'test-api-key-12345678'; process.env.NODE_ENV = 'test'; }); afterAll(() => { // Clean up nock.cleanAll(); }); beforeEach(() => { // Reset nock interceptors before each test nock.cleanAll(); }); afterEach(() => { // Only verify nock interceptors for unit tests, not integration tests if (!process.env.VITEST_POOL_ID?.includes('integration') && nock.isActive()) { if (!nock.isDone()) { console.error('Pending nock interceptors:', nock.pendingMocks()); nock.cleanAll(); throw new Error('Not all nock interceptors were called'); } } });

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/hongkongkiwi/clockify-master-mcp'

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