Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jest-teamcity

itereshchenkov127.4kMIT1.12.0

Teamcity Reporter for Jest Testing framework

jest, teamcity, reporter, tests, unit, unittest, integration, ci, cd

readme

jest-teamcity

Build Status Package Verifier

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

Features

  • grouping tests by test suites
  • output tests duration
  • output pending, failed test with message and stack

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]

changelog

CHANGELOG

1.5.0 - 2019-10-07

Changed

  • Updated dependencies
  • Add Prettier
  • Add support of TeamCity FlowID

1.4.0 - 2019-02-05

Changed

  • Updated dependencies

1.3.0 - 2017-06-27

Fixed

  • Fixed issue with doing exit(1) in case of failed test suites

1.2.1, 1.2.2 - 2017-06-26

Removed

  • Removed captureStandardOutput attr from report in order to allow test suite do exist(1)

1.2.0 - 2017-05-18

Added

  • Included filename into suite hierarchy

1.1.0 - 2017-05-04

Added

  • covered with Unit Tests

Removed

  • Removed parsec dependency

Changed

  • Use TEAMCITY_VERSION env param instead of using --teamcity to activate a reporter
  • Updated usage section in README.md

1.0.0 - 2016-12-25

Added

  • Formatter module
  • Use --teamcity params to enable reporter