mcp-server.test.ts•857 B
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { MCPResearchServer } from '../src/mcp-server.js';
describe('MCPResearchServer', () => {
let server: MCPResearchServer;
beforeEach(() => {
server = new MCPResearchServer();
});
afterEach(async () => {
await server.close();
});
it('should create server instance', () => {
expect(server).toBeInstanceOf(MCPResearchServer);
});
it('should have expected tools available', async () => {
// This test would require a more complex setup to actually test the MCP protocol
// For now, we just verify the server can be instantiated and closed
expect(server).toBeDefined();
});
it('should handle server lifecycle', async () => {
// Test that close doesn't throw an error
await expect(server.close()).resolves.not.toThrow();
});
});