Classes

c
JUnitReporter

JUnit XML reporter — an additive artifact reporter, not a stdout format. Enabled with --junit[=<path>], it accumulates a <testcase> per testEnd and writes the document at run end, while whichever --reporter is active keeps owning stdout. That split matters: CI wants a readable log and a machine-readable file, and it's what --coverage=lcov already does for coverage artifacts.

Functions

f
buildXML(cases: JUnitCase[]): string

Builds the full JUnit XML document string from a flat list of test cases.

f
outputPath(context: ReporterContext): string

Resolves where the JUnit document is written: --junit=<path> (relative to the project root) when given a string, else <output>/junit.xml.

f
toCase(
context: ReporterContext,
details: TestDetails
): JUnitCase

Converts one testEnd into a JUnit <testcase>. Failing assertions are flattened into a failureDetail with stacks resolved back to original sources (same as the TAP at: field).