| 779 | // ── Output formatting ───────────────────────────────────────────────────────── |
| 780 | |
| 781 | function printScenarioResult(scenario, result, verbose) { |
| 782 | const tag = result.passed ? 'PASS' : result.skipped ? 'SKIP' : 'FAIL'; |
| 783 | const note = result.mode === 'static-only' ? ' [static]' : ''; |
| 784 | console.log(` ${tag.padEnd(5)} ${scenario.skill}/${scenario.name}${note}`); |
| 785 | |
| 786 | if (result.skipped && scenario.skipReason) { |
| 787 | console.log(` Reason: ${scenario.skipReason}`); |
| 788 | } |
| 789 | |
| 790 | if (!result.passed && !result.skipped) { |
| 791 | if (result.executionError) { |
| 792 | console.log(` Execution error: ${result.executionError}`); |
| 793 | } |
| 794 | for (const ar of (result.assertionResults || [])) { |
| 795 | if (!ar.passed) console.log(` FAIL assertion: ${ar.assertion}`); |
| 796 | } |
| 797 | } |
| 798 | |
| 799 | if (result.mode === 'static-only' && result.validationIssues && result.validationIssues.length > 0) { |
| 800 | for (const issue of result.validationIssues) { |
| 801 | console.log(` WARN: ${issue}`); |
| 802 | } |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | // ── Main ────────────────────────────────────────────────────────────────────── |
| 807 | |