MCPcopy
hub / github.com/vitest-dev/vitest / getDuration

Function getDuration

packages/vitest/src/node/reporters/junit.ts:114–117  ·  view source on GitHub ↗
(task: Task)

Source from the content-addressed store, hash-verified

112}
113
114export function getDuration(task: Task): string | undefined {
115 const duration = task.result?.duration ?? 0
116 return executionTime(duration)
117}
118
119export class JUnitReporter implements Reporter {
120 private ctx!: Vitest

Callers 2

writeTasksMethod · 0.70
onTestRunEndMethod · 0.70

Calls 1

executionTimeFunction · 0.70

Tested by

no test coverage detected