yyqdbngt opened a new pull request, #3877: URL: https://github.com/apache/rocketmq-dashboard/pull/3877
### Motivation The formatting utility tests concentrated on edge cases (zero, negatives, non-finite input) and left the normal rendering paths of several helpers unasserted. This PR grows the suite from 9 to 16 tests. ### Changes - `formatBytes` positive rendering across B/KB/MB boundaries. - `formatTimeOfDay` leading-zero hours, including midnight. - `formatRelativeTime` falls back to month/day (zh and en) when the timestamp lands on a previous calendar date. - `formatDateTime`/`formatDate` full local rendering for `Date` objects and date-only strings. - `formatDelay` zh/en branch coverage (hours/minutes, day+hour+minute, seconds-only, zero and negative inputs). - `formatNumber` thousands separators and fraction retention. - `formatUtcDateTime` honors explicit offsets (e.g. `+02:00`) while still treating naive values as UTC. - `formatPercent` default-precision rendering. ### Verification - `vitest run src/utils/format.test.ts`: 16/16 passed - `tsc --noEmit`: clean - `eslint src/utils/format.test.ts`: clean -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
