From 96df6db61ef53aee23ae7701a892af5c47a5eb69 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Wed, 31 Mar 2021 21:33:21 +0200 Subject: [PATCH] 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. --- src/utils/markdown-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/markdown-utils.ts b/src/utils/markdown-utils.ts index d9aeae5..0b02911 100644 --- a/src/utils/markdown-utils.ts +++ b/src/utils/markdown-utils.ts @@ -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`