node-test-junit-reporter is a utility package designed to integrate with Node.js's built-in test runner, generating JUnit XML formatted test reports. It functions as a command-line test reporter, allowing developers to output test results in a standardized, machine-readable format compatible with Continuous Integration (CI) systems like Jenkins, GitLab CI, or GitHub Actions. The current stable version is 2.0.1. Releases occur frequently, primarily driven by dependency updates and minor bug fixes, with major versions introducing Node.js compatibility changes. Its primary differentiation lies in its direct integration with the native `node --test` command, providing a straightforward solution for projects utilizing Node.js's own testing capabilities without external test frameworks.
npm install node-test-junit-reporterNo compatibility data collected yet for this library.
Demonstrates how to configure and run Node.js native tests with `node-test-junit-reporter` to generate a `report.xml` file, including setup in `package.json` and a sample test file structure.
Upgrade your Node.js environment to version 22 or newer, or pin `node-test-junit-reporter` to a compatible earlier version (e.g., `^1.0.0`) if a Node.js upgrade is not feasible.
Always pair `--test-reporter <reporter-name>` with `--test-reporter-destination <output-path>` directly. For example: `node --test --test-reporter tap --test-reporter-destination stdout --test-reporter node-test-junit-reporter --test-reporter-destination report.xml`
Review any CI/CD pipelines or scripts that parse the `time` attribute from the generated JUnit XML reports to ensure they correctly interpret the value as seconds after upgrading to v2.0.1 or later.
Ensure `node-test-junit-reporter` is installed in your project's `node_modules` directory (`npm install -D node-test-junit-reporter`) and that the `node` command is run from the project root or a location where local `node_modules` can be resolved.
Upgrade your Node.js environment to version 22 or newer, or modify your `package.json` to use a compatible earlier version of `node-test-junit-reporter` (e.g., `"node-test-junit-reporter": "^1.0.0"`).
No dependency data recorded yet.