Jest TeamCity Reporter

1.12.0 · active · verified Sun Apr 19

jest-teamcity is a specialized Jest reporter designed to integrate test results with TeamCity CI/CD servers. Currently at version 1.12.0, this package provides detailed reporting, including test durations, pending test statuses, and full stack traces for failed tests, all formatted using TeamCity's service messages. It automatically groups tests into logical suites, enhancing readability and analysis within TeamCity's interface. Releases are generally infrequent, focusing on maintenance, dependency updates, and addressing specific edge cases or improvements in how Jest's internal APIs or TeamCity's expectations are handled. A key differentiator is its automatic activation based on the `TEAMCITY_VERSION` environment variable, ensuring it only outputs TeamCity-specific messages when running within that environment, while defaulting to standard Jest output otherwise. This prevents noisy output during local development.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to install `jest-teamcity`, configure it in Jest, and enable its output via an environment variable for local testing or CI.

npm install --save-dev jest-teamcity

// jest.config.js
module.exports = {
  "reporters": ["default", "jest-teamcity"]
};

// package.json
// ...
// "scripts": {
//     "test": "jest"
// }
// ...

// To run locally with TeamCity output enabled:
// In your terminal before running tests:
export TEAMCITY_VERSION="some_version" 
# Then run your tests
npm test

view raw JSON →