itereshchenkov / jest-teamcity

Jest Teamcity Reporter
MIT License
31 stars 13 forks source link
jest jest-teamcity teamcity teamcity-formatter teamcity-reporter testing-tools unit-testing

jest-teamcity

Build Status Package Verifier

TeamCity Reporter for Jest testing framework which groups tests using TeamCity Test Suites.

Features

Install

Install with npm: npm install --save-dev jest-teamcity

Usage

Add this into the jest configuration file:

"reporters": ["default", "jest-teamcity"]

The reporter is enabled only if TEAMCITY_VERSION environment variable is set. It should work in TeamCity by default.

To be able to run the tests with the reporter locally, environment variable should be set:

export TEAMCITY_VERSION="some_version"

Package.json example:

"scripts": {
    "test": "jest"
}

With this configuration, you can run the tests with npm test. If the TEAMCITY_VERSION environment variable is set, it produces the output in TeamCity's format. Otherwise, standard jest output is produced.

License

MIT © [Ivan Tereshchenkov]