MCPcopy
hub / github.com/epicweb-dev/react-performance / printTestSummary

Function printTestSummary

epicshop/test.js:36–60  ·  view source on GitHub ↗
(results)

Source from the content-addressed store, hash-verified

34}
35
36function printTestSummary(results) {
37 const label = '--- Test Summary ---'
38 console.log(`\n${label}`)
39 for (const [appPath, { result, duration }] of results) {
40 let emoji
41 switch (result) {
42 case 'Passed':
43 emoji = '✅'
44 break
45 case 'Failed':
46 emoji = '❌'
47 break
48 case 'Error':
49 emoji = '💥'
50 break
51 case 'Incomplete':
52 emoji = '⏳'
53 break
54 default:
55 emoji = '❓'
56 }
57 console.log(`${emoji} ${appPath} (${duration.toFixed(2)}s)`)
58 }
59 console.log(`${'-'.repeat(label.length)}\n`)
60}
61
62async function main() {
63 const allApps = (await getApps()).filter((app) => app.test.type === 'script')

Callers 2

shutdownHandlerFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected