MCPcopy
hub / github.com/jestjs/jest / getTestDuration

Function getTestDuration

packages/jest-circus/src/utils.ts:314–317  ·  view source on GitHub ↗
(test: Circus.TestEntry)

Source from the content-addressed store, hash-verified

312};
313
314export const getTestDuration = (test: Circus.TestEntry): number | null => {
315 const {startedAt} = test;
316 return typeof startedAt === 'number' ? Date.now() - startedAt : null;
317};
318
319export const makeRunResult = (
320 describeBlock: Circus.DescribeBlock,

Callers 1

eventHandlerFunction · 0.90

Calls 1

nowMethod · 0.65

Tested by

no test coverage detected