winterbe / jest-teamcity-reporter

Teamcity Reporter for Jest Unittest Results
https://www.npmjs.com/package/jest-teamcity-reporter
Other
50 stars 23 forks source link

unrecognized option --teamcity #2

Closed sontek closed 7 years ago

sontek commented 7 years ago

I'm trying to use this and I see:

npm run test:teamcity

> jest --teamcity

Unrecognized options: teamcity
 PASS  static/js/materials/button.test.js
 PASS  static/js/materials/header.test.js
 PASS  static/js/materials/card.test.js
 PASS  static/js/materials/message.test.js
 PASS  static/js/api/index.test.js

Test Suites: 5 passed, 5 total
Tests:       6 passed, 6 total
Snapshots:   0 total
Time:        5.477s
Ran all test suites.

##teamcity[testSuiteStarted name='materials/button.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testStarted name='renders with props without exploding']
##teamcity[testFinished name='renders with props without exploding']
##teamcity[testSuiteFinished name='materials/button.test.js']
##teamcity[testSuiteStarted name='materials/header.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testSuiteFinished name='materials/header.test.js']
##teamcity[testSuiteStarted name='materials/card.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testSuiteFinished name='materials/card.test.js']
##teamcity[testSuiteStarted name='materials/message.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testSuiteFinished name='materials/message.test.js']
##teamcity[testSuiteStarted name='api/index.test.js']
##teamcity[testStarted name='Can generate querystring from object']
##teamcity[testFinished name='Can generate querystring from object']
##teamcity[testSuiteFinished name='api/index.test.js']

It does seem to recognize the option because I see the teamcity log lines but it does report Unrecognized options: teamcity which is weird. My other concern is that I see the logs for passing/failing before any of the teamcity logging. How can I get it to report pass/fail within it?

pitermarx commented 7 years ago

I think this is just Jest reporting that it does not recognize the teamcity flag. This is expected. This flag is only picked up by the custom reporter. Dont worry about the jest logs. Teamcity ignores them.

sontek commented 7 years ago

Cool, I'll close this then

winterbe commented 7 years ago

Thanks @pitermarx for clarifying.

Maybe the README is still too vage on that.