From e9a40a1499e32c23e132020635dabab7258a167f Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Mon, 17 Aug 2026 22:55:17 +0300 Subject: [PATCH] =?UTF-8?q?fix(tests):=20verify-snapshots=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=87=D0=B0=D0=B5=D1=82=20=D0=BF=D1=80=D0=BE=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D0=BA=D0=B8=20=D0=B2=20REPORT.md,=20=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D1=81=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1=82=20?= =?UTF-8?q?=D0=B8=D1=85=20=D0=BF=D0=B0=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F=D0=BC?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Консольная сводка пропуски различала, а файл отчёта нет: статус считался как `passed ? OK : FAIL`, поэтому пропущенный кейс печатался как FAIL, попадал в счётчик падений и в раздел Findings. Отчёт читают глазами и по нему решают, есть ли проблема, — расхождение с консолью здесь дороже всего. Co-Authored-By: Claude Opus 5 (1M context) --- tests/skills/verify-snapshots.mjs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/skills/verify-snapshots.mjs b/tests/skills/verify-snapshots.mjs index c4c38c00..087951fa 100644 --- a/tests/skills/verify-snapshots.mjs +++ b/tests/skills/verify-snapshots.mjs @@ -1459,19 +1459,24 @@ function writeReport(results) { `# Snapshot Verification Report`, ``, `Date: ${new Date().toISOString().split('T')[0]}`, - `Total: ${results.length} | Passed: ${results.filter(r => r.passed).length} | Failed: ${results.filter(r => !r.passed).length}`, + `Total: ${results.length} | Passed: ${results.filter(r => r.passed && !r.skipped).length}` + + ` | Failed: ${results.filter(r => !r.passed && !r.skipped).length}` + + ` | Skipped: ${results.filter(r => r.skipped).length}`, ``, ]; lines.push('| Skill | Case | Status | Error |'); lines.push('|-------|------|--------|-------|'); for (const r of results) { - const status = r.passed ? 'OK' : 'FAIL'; + // Пропуск — не падение: в консольной сводке они уже различались, а в файле отчёта пропуск + // выглядел как FAIL и попадал в счётчик падений. Отчёт читают глазами и по нему решают, + // есть ли проблема, — расхождение с консолью здесь дороже всего. + const status = r.skipped ? 'SKIP' : (r.passed ? 'OK' : 'FAIL'); const error = r.errors.length > 0 ? r.errors[0].substring(0, 100).replace(/\|/g, '\\|').replace(/\n/g, ' ') : ''; lines.push(`| ${r.skill} | ${r.case} | ${status} | ${error} |`); } - const failures = results.filter(r => !r.passed); + const failures = results.filter(r => !r.passed && !r.skipped); if (failures.length > 0) { lines.push('', '## Findings', ''); for (const r of failures) {