Skip to main content
Glama
results-processor.cjs2.45 kB
module.exports = function resultsProcessor(results) { // Log test summary console.log('\n📊 Test Results Summary:'); console.log(`Total Tests: ${results.numTotalTests}`); console.log(`Passed: ${results.numPassedTests}`); console.log(`Failed: ${results.numFailedTests}`); console.log(`Skipped: ${results.numPendingTests}`); console.log(`Test Suites: ${results.numTotalTestSuites}`); console.log(`Time: ${(results.testResults.reduce((acc, result) => acc + (result.perfStats.end - result.perfStats.start), 0) / 1000).toFixed(2)}s`); // Coverage summary if (results.coverageMap) { const coverage = results.coverageMap.getCoverageSummary(); console.log('\n📈 Coverage Summary:'); console.log(`Lines: ${coverage.lines.pct}%`); console.log(`Functions: ${coverage.functions.pct}%`); console.log(`Branches: ${coverage.branches.pct}%`); console.log(`Statements: ${coverage.statements.pct}%`); } // Failed tests details if (results.numFailedTests > 0) { console.log('\n❌ Failed Tests:'); results.testResults.forEach(testResult => { if (testResult.numFailingTests > 0) { console.log(`\n ${testResult.testFilePath}:`); testResult.testResults.forEach(test => { if (test.status === 'failed') { console.log(` - ${test.fullName}`); if (test.failureMessages.length > 0) { console.log(` ${test.failureMessages[0].split('\n')[0]}`); } } }); } }); } // Performance warnings const slowTests = results.testResults.filter(result => (result.perfStats.end - result.perfStats.start) > 5000 ); if (slowTests.length > 0) { console.log('\n⚠️ Slow Tests (>5s):'); slowTests.forEach(test => { const duration = ((test.perfStats.end - test.perfStats.start) / 1000).toFixed(2); console.log(` ${test.testFilePath}: ${duration}s`); }); } // Security test results const securityTests = results.testResults.filter(result => result.testFilePath.includes('security.test') ); if (securityTests.length > 0) { console.log('\n🔒 Security Tests:'); securityTests.forEach(test => { const passed = test.numPassingTests; const total = test.numPassingTests + test.numFailingTests; console.log(` ${test.testFilePath}: ${passed}/${total} passed`); }); } console.log('\n'); return results; };

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/Chykalophia/ClickUp-MCP-Server---Enhanced'

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