(testResults: { testName: string; result: boolean }[])
| 378 | } |
| 379 | |
| 380 | function 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 | |
| 400 | const devcontainerTemplate = ` |
| 401 | { |
no test coverage detected