Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(trace-viewer): format negative duration as - (#30840)

Yury Semikhatskydcaded525566
diff --git a/packages/web/src/uiUtils.ts b/packages/web/src/uiUtils.ts
index 7e00693234..95d0d42a53 100644
--- a/packages/web/src/uiUtils.ts
+++ b/packages/web/src/uiUtils.ts
@@ -55,7 +55,7 @@ export function useMeasure<T extends Element>() {
}
export function msToString(ms: number): string {
- if (!isFinite(ms))
+ if (ms < 0 || !isFinite(ms))
return '-';
if (ms === 0)