Skip to content

Commit

Permalink
feat: use formatTime
Browse files Browse the repository at this point in the history
  • Loading branch information
FauxFaux committed Dec 5, 2020
1 parent 1f16421 commit a7dc831
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/jest-circus/src/deadlineTimeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -32,7 +33,7 @@ async function timeout<T>(promise: Promise<T>, ms: number): Promise<T> {
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))
Expand Down

0 comments on commit a7dc831

Please sign in to comment.