MCPcopy Index your code
hub / github.com/devcontainers/cli / analyzeTestResults

Function analyzeTestResults

src/spec-node/featuresCLI/testCommandImpl.ts:380–398  ·  view source on GitHub ↗
(testResults: { testName: string; result: boolean }[])

Source from the content-addressed store, hash-verified

378}
379
380function analyzeTestResults(testResults: { testName: string; result: boolean }[]): number {
381 if (!testResults) {
382 fail('No test results found!');
383 }
384 // 4. Print results
385 // NOTE: 0 tests means allPassed == true.
386 const allPassed = testResults.every((x) => x.result);
387 process.stdout.write('\n\n\n');
388 log('================== TEST REPORT ==================', { 'info': true, 'prefix': ' ' });
389 testResults.forEach(t => {
390 if (t.result) {
391 log(`Passed: '${t.testName}'`, { 'prefix': '✅', 'info': true });
392 } else {
393 log(`Failed: '${t.testName}'`, { 'prefix': '❌', 'info': true });
394 }
395 });
396 process.stdout.write('\n');
397 return allPassed ? 0 : 1;
398}
399
400const devcontainerTemplate = `
401{

Callers 1

doFeaturesTestCommandFunction · 0.85

Calls 3

failFunction · 0.85
logFunction · 0.85
writeMethod · 0.65

Tested by

no test coverage detected