mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Round test duration to whole seconds if it's more then 1s
Report will contain less accurate information but it will be easier to read.
This commit is contained in:
parent
3c4d3b3836
commit
96df6db61e
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ export function ellipsis(text: string, maxLength: number): string {
|
||||||
|
|
||||||
export function formatTime(ms: number): string {
|
export function formatTime(ms: number): string {
|
||||||
if (ms > 1000) {
|
if (ms > 1000) {
|
||||||
return `${(ms / 1000).toFixed(3)}s`
|
return `${Math.round(ms / 1000)}s`
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${Math.round(ms)}ms`
|
return `${Math.round(ms)}ms`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue