* Generate markdown report
(skippedTests: SkippedTest[], results: TestResult[])
| 242 | * Generate markdown report |
| 243 | */ |
| 244 | function generateReport(skippedTests: SkippedTest[], results: TestResult[]): string { |
| 245 | const lines: string[] = []; |
| 246 | |
| 247 | lines.push("# TCK Audit Results"); |
| 248 | lines.push(""); |
| 249 | lines.push(`Generated: ${new Date().toISOString()}`); |
| 250 | lines.push(""); |
| 251 | |
| 252 | // Summary |
| 253 | const design = skippedTests.filter((t) => t.category === "design"); |
| 254 | const nowWorking = skippedTests.filter((t) => t.category === "now_working"); |
| 255 | const unknown = skippedTests.filter((t) => t.category === "unknown"); |
| 256 | |
| 257 | const passed = results.filter((r) => r.passed); |
| 258 | const failed = results.filter((r) => !r.passed); |
| 259 | |
| 260 | lines.push("## Summary"); |
| 261 | lines.push(""); |
| 262 | lines.push(`| Category | Count |`); |
| 263 | lines.push(`|----------|-------|`); |
| 264 | lines.push(`| Total Skipped | ${skippedTests.length} |`); |
| 265 | lines.push(`| Design Exclusions (won't fix) | ${design.length} |`); |
| 266 | lines.push(`| Citing "Now Working" Features | ${nowWorking.length} |`); |
| 267 | lines.push(`| Unknown/Other Reasons | ${unknown.length} |`); |
| 268 | lines.push(""); |
| 269 | |
| 270 | if (results.length > 0) { |
| 271 | lines.push("## Test Results"); |
| 272 | lines.push(""); |
| 273 | lines.push(`| Result | Count |`); |
| 274 | lines.push(`|--------|-------|`); |
| 275 | lines.push(`| Passed (can unskip) | ${passed.length} |`); |
| 276 | lines.push(`| Failed (real blocker) | ${failed.length} |`); |
| 277 | lines.push(""); |
| 278 | } |
| 279 | |
| 280 | // Design exclusions |
| 281 | lines.push("## Design Exclusions (Will Not Be Fixed)"); |
| 282 | lines.push(""); |
| 283 | lines.push("These tests require features that conflict with design decisions:"); |
| 284 | lines.push(""); |
| 285 | for (const test of design.slice(0, 20)) { |
| 286 | const relPath = path.relative(TCK_DIR, test.file); |
| 287 | lines.push(`- \`${relPath}:${test.lineNumber}\`: ${test.skipReason}`); |
| 288 | } |
| 289 | if (design.length > 20) { |
| 290 | lines.push(`- ... and ${design.length - 20} more`); |
| 291 | } |
| 292 | lines.push(""); |
| 293 | |
| 294 | // Now working candidates |
| 295 | lines.push('## Candidates: Citing "Now Working" Features'); |
| 296 | lines.push(""); |
| 297 | lines.push("These tests cite features that are now implemented. They should be verified:"); |
| 298 | lines.push(""); |
| 299 | for (const test of nowWorking.slice(0, 30)) { |
| 300 | const relPath = path.relative(TCK_DIR, test.file); |
| 301 | lines.push(`- \`${relPath}:${test.lineNumber}\`: ${test.skipReason}`); |