https://github.com/winterbe/jest-teamcity-reporter
Teamcity Reporter for Jest Unittest Results
https://github.com/winterbe/jest-teamcity-reporter
ci continuous-integration jest teamcity unittest
Last synced: 3 months ago
JSON representation
Teamcity Reporter for Jest Unittest Results
- Host: GitHub
- URL: https://github.com/winterbe/jest-teamcity-reporter
- Owner: winterbe
- License: other
- Created: 2016-09-07T08:50:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-29T11:30:58.000Z (over 4 years ago)
- Last Synced: 2025-06-07T08:42:35.627Z (4 months ago)
- Topics: ci, continuous-integration, jest, teamcity, unittest
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/jest-teamcity-reporter
- Size: 295 KB
- Stars: 50
- Watchers: 4
- Forks: 23
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jest-teamcity-reporter
> Integrate Jest test results into your Teamcity CI builds




This package will report your JavaScript Jest test results to your Teamcity CI server, so you can see the number of executed tests, test failures and the tests tab right from your Teamcity UI.
---
★★★ Like this project? Leave a star, follow on Twitter or donate to support my work! Thanks. ★★★### Usage
First, install the package from NPM: `npm install --save-dev jest-teamcity-reporter`
The reporter integrates with Jest in form of a [testResultsProcessor](https://facebook.github.io/jest/docs/en/configuration.html#testresultsprocessor-string). Put this into your projects `package.json`:
```
"jest": {
"testResultsProcessor": "jest-teamcity-reporter"
}
```The reporter is only active when the environment variable `TEAMCITY_VERSION` is present which should be the case for most common Teamcity server installations. So on your local machine the reporter should be disabled by default. You can test the reporter by temporarily setting the environment variable:
`export TEAMCITY_VERSION="your_version"`
Then, just use Jest as usual, e.g. put this in your `package.json`
```
"scripts": {
"test": "jest"
}
```Then, simply run `npm test` locally and from Teamcity.
> Versions < 0.5.0 also supported activation via cli option `--teamcity` but Jest no longer supports custom options, so this option is no longer available.
### License
MIT © [Benjamin Winterberg](https://twitter.com/winterbe_)