Skip to content

Commit

Permalink
Round test duration to whole seconds if it's more then 1s
Browse files Browse the repository at this point in the history
Report will contain less accurate information but it will be easier to read.
  • Loading branch information
Michal Dorner committed Mar 31, 2021
1 parent 3c4d3b3 commit 96df6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/markdown-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 96df6db

Please sign in to comment.