Skip to main content
Glama

Scholarly Research MCP Server

by aringadre76
jest.setup.js1.36 kB
// Jest setup file for MCP tests jest.setTimeout(30000); // Mock console methods to avoid "Cannot log after tests are done" warnings const originalConsoleLog = console.log; const originalConsoleError = console.error; const originalConsoleWarn = console.warn; beforeAll(() => { // Suppress console output during tests to avoid Jest warnings console.log = jest.fn(); console.error = jest.fn(); console.warn = jest.fn(); }); afterAll(() => { // Restore console methods console.log = originalConsoleLog; console.error = originalConsoleError; console.warn = originalConsoleWarn; }); // Global test utilities global.testUtils = { // Helper to create a simple test wrapper createTestWrapper: (testFunction) => { return async () => { try { await testFunction(); } catch (error) { // Don't fail the test for API rate limiting or network issues if (error.message && error.message.includes('429')) { console.log('Skipping test due to PubMed API rate limiting'); return; } throw error; } }; } }; // Add a test to this file so Jest doesn't complain describe('Jest Setup', () => { test('should initialize test utilities', () => { expect(global.testUtils).toBeDefined(); expect(typeof global.testUtils.createTestWrapper).toBe('function'); }); });

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/aringadre76/mcp-for-research'

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