Skip to main content
Glama
bugs.test.ts936 B
import { describe, it, expect } from 'vitest'; /** * Regression test example * * When bugs are found, add tests here to prevent regression */ describe('Regression tests', () => { it('should handle empty TODO list gracefully', () => { // Example: Bug where empty TODO caused crash // Fixed: Added validation const todoList: string[] = []; expect(() => { // Your code that processes TODO todoList.forEach((item) => console.log(item)); }).not.toThrow(); }); it('should handle undefined model configuration', () => { // Example: Crash when model not found const modelId = 'non-existent'; expect(() => { const model = undefined; // getModelById(modelId) if (!model) { throw new Error(`Model ${modelId} not found`); } }).toThrow('Model non-existent not found'); }); });

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/babasida246/ai-mcp-gateway'

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