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

Function matchJunitTime

test/cli/test/reporters/junit.test.ts:132–138  ·  view source on GitHub ↗
(xml: string, regex: RegExp)

Source from the content-addressed store, hash-verified

130}
131
132function matchJunitTime(xml: string, regex: RegExp) {
133 const match = xml.match(regex)
134 expect(match).not.toBeNull()
135 const time = Number.parseFloat(match!.groups!.floatNumber)
136 expect(time).toBeGreaterThanOrEqual(0)
137 return time
138}
139
140test.each([true, false])('includeConsoleOutput %s', async (t) => {
141 const { stdout } = await runVitest({

Callers 1

junit.test.tsFile · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected