mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08: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:
@@ -41,7 +41,7 @@ export function ellipsis(text: string, maxLength: number): string {
|
||||
|
||||
export function formatTime(ms: number): string {
|
||||
if (ms > 1000) {
|
||||
return `${(ms / 1000).toFixed(3)}s`
|
||||
return `${Math.round(ms / 1000)}s`
|
||||
}
|
||||
|
||||
return `${Math.round(ms)}ms`
|
||||
|
||||
Reference in New Issue
Block a user