-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Added ability to configure Jest via package.json #1990
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
- works when NOT ejected by merging default and app Jest options - eject simply combines app and default into a single package.json jest field
fa18aa6
to
367e2b8
Compare
It looks like #1830 was earlier so I’ll build on top of that. |
@gaearon is there a plan in place / a PR in the works already to enable overriding of the testResultsProcessor? This is the option I personally would like to override in my projects. Should be as simple as adding it here. |
I don’t think it’s a good idea to override it in Jest config—how would you run tests locally? My impression is you should just pass it as an argument at CI, e.g.
and then run that instead of |
@gaearon this approach worked! Thanks for the pointer. Quick thing though, I ended up doing this:
after installing |
Cool, thanks! |
fixes #1785
Verified against my own project via
npm link
commands. I added ajest
config within mypackage.json
, ranCI=true npm test
and verified that it was using my extra configuration options. I also ejected locally to make sure that worked properly and it did, resulting in apackage.json
with the merged options in thejest
field. I am open to advice on how else to test this feature.