Skip to main content
Glama
run-all-tests.tsโ€ข1.75 kB
#!/usr/bin/env node /** * Test runner to execute all test suites */ import { testAPIRequestValidation } from './api-request-validation.test.js'; import { testCompleteFlow } from './complete-flow.test.js'; import { testToolHandlers } from './tool-handlers.test.js'; import { testResponseTypes } from './response-types.test.js'; async function runAllTests() { console.log('๐Ÿงช Running MCP API Server Test Suite'); console.log('====================================\n'); const tests = [ { name: 'API Request Validation', fn: testAPIRequestValidation }, { name: 'Tool Handlers', fn: testToolHandlers }, { name: 'Complete Flow', fn: testCompleteFlow }, { name: 'Response Types', fn: testResponseTypes }, ]; let passedSuites = 0; const totalSuites = tests.length; for (const test of tests) { console.log(`\n๐Ÿ” Running ${test.name} Tests`); console.log('='.repeat(50)); try { await test.fn(); console.log(`\nโœ… ${test.name} tests completed successfully`); passedSuites++; } catch (error) { console.log(`\nโŒ ${test.name} tests failed:`, error); } console.log('\n' + '='.repeat(50)); } console.log(`\n๐Ÿ“Š Test Suite Summary`); console.log('===================='); console.log(`Passed: ${passedSuites}/${totalSuites} test suites`); if (passedSuites === totalSuites) { console.log('๐ŸŽ‰ All test suites passed!'); process.exit(0); } else { console.log('๐Ÿ’ฅ Some test suites failed'); process.exit(1); } } // Run all tests if this file is executed directly if (require.main === module) { runAllTests().catch((error) => { console.error('Test runner failed:', error); process.exit(1); }); } export { runAllTests };

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/fikri2992/mcp0'

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