Skip to main content
Glama

Motion.dev MCP Server

setup.ts1.88 kB
/** * Jest Test Setup * Global test configuration and utilities */ // Mock console methods to reduce noise in tests const originalConsole = { ...console }; beforeEach(() => { // Restore console for each test Object.assign(console, originalConsole); }); // Mock process.env for consistent testing process.env.NODE_ENV = 'test'; process.env.LOG_LEVEL = 'error'; // Reduce logging noise in tests // Global test timeout jest.setTimeout(30000); // Mock external dependencies that should not make real HTTP calls in tests jest.mock('node-fetch'); // Test utilities export const mockLogger = { debug: jest.fn(), info: jest.fn(), warn: jest.fn(), error: jest.fn() }; // Mock MCP client for integration tests export const mockMCPClient = { request: jest.fn(), notification: jest.fn(), close: jest.fn() }; // Test data generators export const generateMockMotionDoc = () => ({ url: 'https://motion.dev/docs/test', title: 'Test Documentation', content: 'Test content for Motion.dev documentation', framework: 'react' as const, category: 'animation', lastModified: new Date().toISOString() }); export const generateMockAnimationPattern = () => ({ id: 'test-pattern', name: 'Test Pattern', category: 'entrance' as const, description: 'A test animation pattern', performance: { score: 85, bundleSize: 1024, renderComplexity: 'medium' as const }, accessibility: { respectsReducedMotion: true, hasAltText: true, score: 95 }, frameworks: { react: { code: 'const TestComponent = () => <div>Test</div>;', imports: ['React'], dependencies: [] }, js: { code: 'function testAnimation() { return "test"; }', imports: [], dependencies: [] }, vue: { code: '<template><div>Test</div></template>', imports: ['vue'], dependencies: [] } } });

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/Abhishekrajpurohit/motion-dev-mcp'

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