fix(html-reporter): round durations before choosing the unit
Merged
WA
15d ago+22+22+01234567890123456789-5-5-0123456789
What and why
- The HTML report could show a duration as
1000ms,60.0s, or1m 60s, because it chose the unit before rounding. - It now rounds first, so those values show as
1.0s,1m 0s, and2m 0s. The terminal already does this for minutes, but those helpers live in the Node report package and aren't imported by the report page.
Issue
Fixes #1824
Verified
Ran it locally: yes
| main | this branch |
|---|---|
999.6ms → 1000ms | 1.0s |
59.96s → 60.0s | 1m 0s |
119.6s → 1m 60s | 2m 0s |
1.5s → 1.5s | 1.5s |
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md). - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.