|
3 | 3 | const result = require('./reports/clients/index.json').undici |
4 | 4 |
|
5 | 5 | const failOnError = process.env.FAIL_ON_ERROR === 'true' |
6 | | -const reporter = process.env.REPORTER || 'table' |
7 | 6 | let runFailed = false |
8 | 7 |
|
9 | 8 | let okTests = 0 |
@@ -86,57 +85,22 @@ for (const key of keys) { |
86 | 85 | } |
87 | 86 | } |
88 | 87 |
|
89 | | -if ( |
90 | | - reporter === 'table' |
91 | | -) { |
92 | | - console.log('Autobahn Test Report\n\nSummary:') |
93 | | - |
94 | | - console.table({ |
95 | | - OK: okTests, |
96 | | - Failed: failedTests, |
97 | | - 'Non-Strict': nonStrictTests, |
98 | | - 'Wrong Code': wrongCodeTests, |
99 | | - Unclean: uncleanTests, |
100 | | - 'Failed By Client': failedByClientTests, |
101 | | - Informational: informationalTests, |
102 | | - Unimplemented: unimplementedTests, |
103 | | - 'Total Tests': totalTests |
104 | | - }) |
105 | | - |
106 | | - console.log('Details:') |
107 | | - |
108 | | - console.table(reorderedResult) |
109 | | -} |
| 88 | +console.log('Autobahn Test Report\n\nSummary:') |
| 89 | + |
| 90 | +console.table({ |
| 91 | + OK: okTests, |
| 92 | + Failed: failedTests, |
| 93 | + 'Non-Strict': nonStrictTests, |
| 94 | + 'Wrong Code': wrongCodeTests, |
| 95 | + Unclean: uncleanTests, |
| 96 | + 'Failed By Client': failedByClientTests, |
| 97 | + Informational: informationalTests, |
| 98 | + Unimplemented: unimplementedTests, |
| 99 | + Total: totalTests |
| 100 | +}) |
110 | 101 |
|
111 | | -if (reporter === 'markdown') { |
112 | | - console.log(`## Autobahn Test Report |
113 | | -
|
114 | | -### Summary |
115 | | -
|
116 | | -| Type | Count | |
117 | | -|---|---| |
118 | | -| OK | ${okTests} | |
119 | | -| Failed | ${failedTests} | |
120 | | -| Non-Strict | ${nonStrictTests} | |
121 | | -| Wrong Code | ${wrongCodeTests} | |
122 | | -| Unclean | ${uncleanTests} | |
123 | | -| Failed By Client | ${failedByClientTests} | |
124 | | -| Informational | ${informationalTests} | |
125 | | -| Unimplemented | ${unimplementedTests} | |
126 | | -| Total Tests | ${totalTests} | |
127 | | -
|
128 | | -<details> |
129 | | -<summary>Details</summary> |
130 | | -
|
131 | | -| Test Case | Behavior | Close Behavior | Duration | Remote Close Code | |
132 | | -|---|---|---|---|---| |
133 | | -${keys.map(key => { |
134 | | - const testCase = reorderedResult[key] |
135 | | - return `| ${key} | ${testCase.behavior} | ${testCase.behaviorClose} | ${testCase.duration} | ${testCase.remoteCloseCode} |` |
136 | | -}).join('\n')} |
137 | | -
|
138 | | -</details> |
139 | | -`) |
140 | | -} |
| 102 | +console.log('Details:') |
| 103 | + |
| 104 | +console.table(reorderedResult) |
141 | 105 |
|
142 | 106 | process.exit(runFailed ? 1 : 0) |
0 commit comments