Skip to main content
Glama
mockClient.ts896 B
import { vi } from 'vitest'; const { mockOrgGet, mockOrgGetAll, mockCreateClient } = vi.hoisted(() => { const mockOrgGet = vi.fn(); const mockOrgGetAll = vi.fn(); const mockCreateClient = vi.fn(() => ({ organization: { get: mockOrgGet, getAll: mockOrgGetAll, }, })); return { mockOrgGet, mockOrgGetAll, mockCreateClient }; }); vi.mock('contentful-management', () => { return { default: { createClient: mockCreateClient, }, createClient: mockCreateClient, }; }); export { mockOrgGet, mockOrgGetAll, mockCreateClient }; export const testOrg = { name: 'Test Organization', sys: { id: 'test-org-id', type: 'Organization', createdAt: '2025-08-25T10:00:00Z', updatedAt: '2025-08-25T10:00:00Z', version: 1, accessPolicy: { sso: false, }, }, }; export const mockArgs = { organizationId: 'test-org-id', };

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