From a7dc831e6303d034a945215a19d0018ee6d79c87 Mon Sep 17 00:00:00 2001 From: "Chris West (Faux)" Date: Sat, 5 Dec 2020 12:01:24 +0000 Subject: [PATCH] feat: use formatTime --- packages/jest-circus/src/deadlineTimeout.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/jest-circus/src/deadlineTimeout.ts b/packages/jest-circus/src/deadlineTimeout.ts index 6eee1f5bdaf5..3936953fb86e 100644 --- a/packages/jest-circus/src/deadlineTimeout.ts +++ b/packages/jest-circus/src/deadlineTimeout.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import {formatTime} from 'jest-util'; import {getState} from './state'; export function deadline(): number { @@ -32,7 +33,7 @@ async function timeout(promise: Promise, ms: number): Promise { if (await sleepCancelled) { return undefined as never; } - const here = new Error(`deadline exceeded (waited here for ${ms}ms)`); + const here = new Error(`deadline exceeded (waited here for ${formatTime(ms)})`); here.stack = here.stack ?.split('\n') .filter(line => !isUs(line))