-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Team city reporter #882
Comments
Because the
^^ That part doesn't get passed on to |
Any recommendations to allow passing reporter config into react-scripts ? |
+1 for this. I've just run into the exact same problem. Tried messing about with the createJestConfig file in react-scripts, but that executes jest in its own note_modules folder and isn't aware of any dependencies at the project root. I'd rather not have to eject the app, but I don't see any other choice. |
Hey guys, have you think about creating a fork version of react-scripts for this use case? It is documented here #779 (It is not actually a finished document, as there are many tricks to make it works for now, but it do works anyway) |
I just had a go and it worked fine.
Then, please read from their npm page:
Therefore
Result: r2@0.1.0 ci C:\Users\Federico\Work\Samples\r2 PASS src\App.test.js Test Suites: 1 passed, 1 total |
When I added "scripts": {
"test:teamcity": "react-scripts test --env=jsdom --testResultsProcessor=jest-teamcity-reporter"
} Or the create-react-app-typescript equivalent: "scripts": {
"test:teamcity": "react-scripts-ts test --env=jsdom --testResultsProcessor=jest-teamcity-reporter"
} |
@mikebridge would you mind sharing your setup steps? |
@bondarewicz When I was debugging it, the only thing I did apart from adding that script immediately after creating the app was to set the environment variable "CI" on the teamcity agent. That works for me both with TypeScript and JavaScript. |
This is configurable in the next version. |
Please help beta test the new version that includes this change! |
I don't think this issue is closed by #1830 Outputting Jest results to TeamCity requires overriding the I managed to getting it working using the solution listed by @mikebridge |
Ah good point, sorry. Missed that. |
@gaearon Why is this closed? Should there be another issue to track this? Because @mikebridge's solution does not currently work. And the pull request and new version don't address this either. |
@dominicscimeca I just upgraded and it is now broken for me too. |
It is closed because nobody reported it was broken 😉 I expect the solution in #882 (comment) to work. Thanks! |
Tagging as needing contributions. Need to look into why this broke. |
@gaearon Actually I am looking into just submitting a pull request. So no worries there. Thank you for all your hard work. And the request would be to have the package json option work. |
The one part I'm confused about: wouldn't that break local watcher? Since I'd expect that "processor" to kick in for local If it would break the local watcher, the CLI solution seems preferable. If not, I'm cool with making it configurable in the Jest object. |
Guys this is not broken... The configuration :
already works.
|
In either case, we need to figure out if passing CLI arguments broke. It's pretty important for us to keep it working. |
@dominicscimeca Now that github is back up I can see that the command-line solution still works ok for me after the upgrade---my problem was elsewhere. I had configured options under |
@federicobarera The reason yours works is because you are calling jest directly @gaearon this is a very good point about locally using the package json. Maybe CLI is the best way. @mikebridge I will check to see what versions I am using and maybe upgrading will resolve the issue. |
@gaearon @mikebridge I really have to apologize. The CLI works completely fine. I was just on an old version of react-scripts. |
think this should be closed @gaearon - @dominicscimeca reported that it seems to be running fine |
Description
I wonder if anyone tried to use team city reporter for jest?
I'm looking at jest-teamcity-reporter and following guide:
npm install --save-dev jest-teamcity-reporter
package.json
and following modification to scripts section:
then run
CI=true npm run ci
Expected behavior
Output of team city reporter
Actual behavior
Tests are run with standard reporter and following message have been reported:
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):└── react-scripts@0.6.1
node -v
:v5.1.0
npm -v
:3.8.1
The text was updated successfully, but these errors were encountered: