Skip to main content
Glama
mockClient.ts1.31 kB
import { vi } from 'vitest'; const { mockEnvironmentCreateWithId, mockEnvironmentDelete, mockEnvironmentGetMany, mockCreateToolClient, } = vi.hoisted(() => { return { mockEnvironmentCreateWithId: vi.fn(), mockEnvironmentDelete: vi.fn(), mockEnvironmentGetMany: vi.fn(), mockCreateToolClient: vi.fn(() => { return { environment: { createWithId: mockEnvironmentCreateWithId, delete: mockEnvironmentDelete, getMany: mockEnvironmentGetMany, }, }; }), }; }); vi.mock('../../utils/tools.js', async (importOriginal) => { const org = await importOriginal<typeof import('../../utils/tools.js')>(); return { ...org, createToolClient: mockCreateToolClient, }; }); export { mockEnvironmentCreateWithId, mockEnvironmentDelete, mockEnvironmentGetMany, mockCreateToolClient, }; export const testEnvironment = { name: 'Test Environment', sys: { id: 'test-environment-id', type: 'Environment', space: { sys: { type: 'Link', linkType: 'Space', id: 'test-space-id' } }, createdAt: '2025-08-25T10:00:00Z', updatedAt: '2025-08-25T10:00:00Z', version: 1, }, }; export const mockArgs = { spaceId: 'test-space-id', environmentId: 'test-environment-id', cmaToken: 'test-cma-token', };

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

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