From be6ddb016c340ca0de01086ffc1af4941862d5a4 Mon Sep 17 00:00:00 2001 From: xingchen <1098756313@qq.com> Date: Fri, 25 Sep 2026 11:58:36 +0800 Subject: [PATCH] feat: add dist/report.js --- dist/report.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 dist/report.js diff --git a/dist/report.js b/dist/report.js new file mode 100644 index 0000000..6efa61c --- /dev/null +++ b/dist/report.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatReport = formatReport; +function formatReport(report) { + const lines = [`覆盖率 ${report.percent}% (${report.covered}/${report.total})`]; + for (const gap of report.gaps) + lines.push(`${gap.requirementId}: ${gap.reason}`); + if (report.orphanCases.length) + lines.push(`无效关联: ${report.orphanCases.join(', ')}`); + if (report.duplicateCases.length) + lines.push(`重复用例: ${report.duplicateCases.join(', ')}`); + return lines.join('\n'); +}