Skip to main content
Glama
endpoints.test.ts962 B
/** * API 端点测试 * 测试 MCP Advisor 的 HTTP API 端点 */ import { describe, test, vi, beforeEach } from 'vitest'; // 模拟 Express 请求和响应对象 describe('API 端点测试', () => { beforeEach(() => { vi.clearAllMocks(); }); describe('搜索端点', () => { test.todo('应该处理有效的搜索请求'); test.todo('应该处理无效的搜索请求'); test.todo('应该处理空查询'); test.todo('应该处理搜索服务错误'); }); describe('安装指南端点', () => { test.todo('应该处理有效的安装指南请求'); test.todo('应该处理无效的仓库 URL'); test.todo('应该处理 GitHub API 错误'); }); describe('健康检查端点', () => { test.todo('应该返回正确的健康状态'); }); describe('错误处理中间件', () => { test.todo('应该捕获并格式化错误'); test.todo('应该处理不同类型的错误'); }); });

Latest Blog Posts

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/istarwyh/mcpadvisor'

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