Jest TeamCity Reporter is a utility package designed to integrate JavaScript Jest test results directly into TeamCity CI builds. Currently at version 0.9.0, it processes Jest's test output and formats it into TeamCity service messages, enabling TeamCity to display test statistics, failures, and test coverage information directly within its UI. Releases appear to be driven by feature additions (like coverage reporting introduced in 0.8.0, and TC10 support in 0.9.0) and bug fixes, with a moderate and stable cadence rather than rapid-fire development. Key differentiators include its seamless integration with TeamCity's native reporting capabilities, providing a rich testing experience directly within the CI dashboard. Its automatic activation based on the `TEAMCITY_VERSION` environment variable is also a significant feature, ensuring it only runs within a TeamCity environment, preventing local execution interference or requiring manual toggles. This makes it a highly specialized and focused tool, ideal for development teams leveraging Jest for their JavaScript testing and TeamCity for their continuous integration pipelines, streamlining the visibility of test outcomes and code quality metrics.
npm install jest-teamcity-reporterVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install and configure `jest-teamcity-reporter` in your `package.json` for a Jest project. It includes a basic test suite and explains how to run tests, simulating the necessary TeamCity environment variable for reporter activation, and shows an example with coverage.
Remove the `--teamcity` flag from your Jest command. Configure the reporter by adding `"testResultsProcessor": "jest-teamcity-reporter"` to your Jest configuration within `package.json` or `jest.config.js`.
Ensure `TEAMCITY_VERSION` is set in your TeamCity build configuration. For local testing, temporarily set the variable (e.g., `export TEAMCITY_VERSION="10.0"` in your shell) before running Jest.
Upgrade to `jest-teamcity-reporter` version 0.3.0 or higher to ensure compatibility with Jest 18+. Always verify reporter compatibility with your specific Jest version.
To get Jest test coverage reported in TeamCity, upgrade to `jest-teamcity-reporter` version 0.8.0 or newer. For full TC10 coverage features, use version 0.9.0 or later.
Verify that `TEAMCITY_VERSION` is defined in your TeamCity build configuration. Confirm that your `package.json` (or `jest.config.js`) contains `"jest": { "testResultsProcessor": "jest-teamcity-reporter" }`.Remove the `--teamcity` flag from your Jest command. Configure the reporter solely via the `testResultsProcessor` property in your Jest configuration.