From fcf473b8e6a4d5a18a14eddd9738cfed5b2ecbe4 Mon Sep 17 00:00:00 2001 From: Jonathan Pool Date: Sat, 3 Oct 2026 15:38:03 -0700 Subject: [PATCH 1/3] add violation counts to reports list --- package.json | 2 +- web/listReports/index.ts | 20 +++++++++++--------- web/util.ts | 4 ++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4207c2f9..9899e866 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jrpool/kilotest", - "version": "57.2.3", + "version": "57.3.0", "description": "Ensemble testing for front-end web quality", "type": "module", "main": "index.ts", diff --git a/web/listReports/index.ts b/web/listReports/index.ts index 6cf9a604..6838940a 100644 --- a/web/listReports/index.ts +++ b/web/listReports/index.ts @@ -119,6 +119,7 @@ const populateQuery = async (query: Record) => { preventedEngineNames, reporterNames, reporterCount, + violationCount, violatorCount } = reportData; // Otherwise, i.e. if it succeeded, add lines about the report. @@ -147,20 +148,21 @@ const populateQuery = async (query: Record) => { const reporterNamesString = reporterNames.join(' + '); reporterString = `${reporterString} (${reporterNamesString})`; } - const issueCountString = getCountString(issueCount, 'issue was', 'issues were'); - const violatorString = getCountString(violatorCount, 'violator was', 'violators were'); lines.tested.push(`${margin}
  • ${reporterString}
  • `); - lines.tested.push(`${margin}
  • ${issueCountString} reported
  • `); - lines.tested.push(`${margin}
  • ${violatorString} reported
  • `); - lines.tested.push(`${margin} `); + lines.tested.push(`${margin}
  • Summary of results:`); + lines.tested.push(`${margin}
      `); + lines.tested.push(`${margin}
    • Violations: ${violationCount}
    • `); + lines.tested.push(`${margin}
    • Violators: ${violatorCount}
    • `); + lines.tested.push(`${margin}
    • Issues: ${issueCount}
    • `); + lines.tested.push(`${margin}
    `); + lines.tested.push(`${margin}
  • `); lines.tested.push(`${margin}`); lines.tested.push(`${margin} `); + lines.tested.push(`${margin} `); lines.tested.push(`${margin}