import { describe, it } from 'vitest';
describe('EventHorizon MCP Server', () => {
it('should import config correctly', () => {
const { config } = await import('../config.js');
expect(config.eventhorizon.baseURL).toBeDefined();
expect(config.rateLimit).toBe(100);
});
it('should create EventHorizon client with authentication', () => {
const { EventHorizonClient } = await import('../api-client.js');
// Mock environment variables for testing
process.env.EVENTHORIZON_BASE_URL = 'http://localhost:8000';
process.env.EVENTHORIZON_API_TOKEN = 'test-token';
const client = new EventHorizonClient();
expect(client.getBaseURL()).toBe('http://localhost:8000');
});
it('should validate required configuration', () => {
const { config } = await import('../config.js');
// Test missing base URL
delete process.env.EVENTHORIZON_BASE_URL;
expect(() => require('../config.js')).toThrow('EVENTHORIZON_BASE_URL environment variable is required');
});
});