Skip to main content
Glama
RegressionTestSuite.ts1.22 kB
import { RegressionTestCase, TestResult } from './types'; export class RegressionTestSuite { private testCases: RegressionTestCase[] = []; public addTest(testCase: RegressionTestCase): void { this.testCases.push(testCase); } public async runAll(): Promise<TestResult[]> { const results: TestResult[] = []; for (const testCase of this.testCases) { const result = await this.runTest(testCase); results.push(result); } return results; } public async runTest(testCase: RegressionTestCase): Promise<TestResult> { const startTime = Date.now(); try { await testCase.test(); return { testCaseId: testCase.id, passed: true, duration: Date.now() - startTime, }; } catch (error) { return { testCaseId: testCase.id, passed: false, message: error instanceof Error ? error.message : String(error), duration: Date.now() - startTime, }; } } public getTestCases(): RegressionTestCase[] { return this.testCases; } }

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/learnwithcc/tally-mcp'

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