Skip to content
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

addon-jest broke tests in the cra-kitchen-sink example #2407

Closed
thomasbertet opened this issue Nov 30, 2017 · 4 comments
Closed

addon-jest broke tests in the cra-kitchen-sink example #2407

thomasbertet opened this issue Nov 30, 2017 · 4 comments

Comments

@thomasbertet
Copy link
Contributor

Hi there,

I simply wanted to run the tests on the cra-kitchen-sink example project, and it fails due to Jest override in package.json:

How to reproduce

  • Checkout the cra-kitchen-sink project
  • run yarn
  • run yarn run test

Why

I'm not sure how to handle this properly since it seems one cannot simply remove these extra configuration keys obviously :)
I'm willing to make yarn run test work to continue implementing another feature so any help from any of you or maybe @renaudtertrais could be timeless 👍

@renaudtertrais
Copy link
Contributor

Perhaps you could extract this configuration needed for addon-jest and put it in a separate file. Then you should just need to add --config ./jest-config-for-addon-jest.json to generate-addon-jest-testresults script.

Usage of --config:
https://facebook.github.io/jest/docs/en/configuration.html#content

@ndelangen
Copy link
Member

Perhaps we can ask CRA to support extending the jest config more?

@thomasbertet
Copy link
Contributor Author

@ndelangen that's a lot of config properties to support and I believe they won't be incline to support all these. Maybe you can start an issue over there, it will certainly have more weight than me ? :)

Also @renaudtertrais thanks for pointing me out to the right direction, I will fix it ASAP.

@ndelangen
Copy link
Member

@thomasbertet If we found an alternative way, then I'm not going to create an issue asking for more configuration in CRA. I know this would be an uphill battle, which I'm personally not really interested in having.

Out of the box CRA-compatibility is important though, So I'm happy we found a way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants