Skip to content

feat(reports): bring the HTML report level with the other formats - #1253

Merged
Chemaclass merged 1 commit into
mainfrom
feat/html-report-parity
Aug 14, 2026
Merged

feat(reports): bring the HTML report level with the other formats#1253
Chemaclass merged 1 commit into
mainfrom
feat/html-report-parity

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1251
Related #1252

Two gaps in one writer, the second found while verifying the first. Shipped together because they are the same file and the same theme — the HTML report lagging every other format — and their tests interleave. Happy to split if you would rather review them apart.

It said a test failed but never why. JUnit carries the message in <failure>, JSON in .message, TAP in its YAML block, Markdown in a fenced block. HTML — the format you open in a browser precisely to find out what broke — dropped it.

The summary did not count risky. A run of one passing and one risky test showed 2 total against categories summing to 1, with nothing on the page saying where the second test went. The row was there, coloured with the .risky class the stylesheet defines; only the numbers were missing.

💡 Changes

  • A Failures section: name, file:line, assertion message, shaped like the Markdown report's. failed is the only status listed — a runtime error records as failed, and flaky passed, so its first-attempt message stays in JUnit's <flakyFailure> rather than under a heading that says Failures
  • Risky and Flaky columns, using get_tests_risky/get_tests_flaky — both already existed and were never called
  • Guarded at two levels, which the mutation test justifies: removing the risky data cell while leaving its header passes the header assertion and fails only the sum. Flaky is excluded from that sum because it stays inside the pass total, so adding it would double-count
  • Also covered at the --parallel boundary, in the test file that exists for that regression class (fix(reports): every report format is empty under --parallel #1004): those arrays are filled inside per-test workers, which is exactly the shape that once came back empty while the run stayed green

Failure messages go through the escaping added in #1249, so a failure comparing <b>want</b> cannot inject markup — pinned by its own test.

Two gaps, one writer, found while verifying the first.

The report said a test failed but never why, while JUnit, JSON, TAP and
Markdown all carry the message -- and HTML is the format opened in a browser
precisely to find that out. It now ends with a Failures section: name,
file:line, and the assertion message, shaped like the Markdown report's.
`failed` is the only status listed; a runtime error records as failed, and
flaky passed, so its first-attempt message stays in JUnit's <flakyFailure>.

The summary counted Passed/Failed/Incomplete/Skipped/Snapshot but not Risky, so
a run with a risky test showed 2 total against categories summing to 1, with
nothing on the page saying where the second test went. The row was there with
its own CSS class; only the numbers were missing. get_tests_risky and
get_tests_flaky already existed and were simply never called.

Guarded at both levels, which the mutation test justifies: removing the risky
data cell while leaving its header passes the header assertion and fails only
the sum. Flaky is excluded from that sum because it stays inside the pass
total.

Related #1251
Related #1252
@Chemaclass Chemaclass added the enhancement New feature or request label Aug 14, 2026
@Chemaclass Chemaclass self-assigned this Aug 14, 2026
@Chemaclass
Chemaclass merged commit 693dd5d into main Aug 14, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the feat/html-report-parity branch August 14, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant