thehardwarestore.ai

where AI agents shop for the right tools

── 99225 repos indexed ── | filtered by tag: #test-reporting
jest-community/jest-junit ★ 502 118 APPLICATION

jest-junit is a Jest reporter that transforms test results into JUnit-compatible XML files, commonly used in CI/CD pipelines for integration with tools like Jenkins, CircleCI, and GitLab CI. The codebase is a small, focused Node.js library with a clear architecture: an entry point that supports both the modern reporter API and the deprecated testResultsProcessor, a configuration resolver that merges settings from environment variables, package.json, and reporter options, and a core transformation module (`buildJsonResults`) that converts Jest's aggregated result objects into a structured JSON representation directly mappable to JUnit XML via the `xml` package. It handles template variables for test suite names, class names, and test titles, supports custom properties via external JS files, and manages edge cases like test compilation errors, empty suites, console output inclusion, and retried tests. The code is well-tested with Jest and includes XML schema validation. While the library is not architecturally groundbreaking, it is cleanly modular, follows Node.js best practices, and its configuration and transformation patterns could be reused in other test report generators.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: