/**
* Jest setup file for DebuggAI MCP Server tests
* Sets up environment variables and global mocks
*/
// Set required environment variables for testing
// Only set API key if not already provided (allows real API key to be used for integration tests)
if (!process.env.DEBUGGAI_API_KEY) {
process.env.DEBUGGAI_API_KEY = 'test-api-key-for-testing';
}
// Only set ENVIRONMENT to 'test' if not already set (allows 'local' for integration tests)
if (!process.env.ENVIRONMENT) {
process.env.ENVIRONMENT = 'test';
}
process.env.LOG_LEVEL = 'error'; // Reduce log noise during tests
// Optional environment variables
process.env.DEBUGGAI_LOCAL_PORT = '3000';
process.env.DEBUGGAI_LOCAL_REPO_NAME = 'test-repo';
process.env.DEBUGGAI_LOCAL_BRANCH_NAME = 'test-branch';
process.env.DEBUGGAI_LOCAL_REPO_PATH = '/test/repo/path';
process.env.DEBUGGAI_LOCAL_FILE_PATH = '/test/file/path';
// Mock global functions that might not be available in test environment
if (typeof global.fetch === 'undefined') {
global.fetch = () => Promise.resolve({} as Response);
}
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/debugg-ai/debugg-ai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server