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

Add Jest configuration for snapshotresolver #6532

Open
akuji1993 opened this issue Feb 27, 2019 · 21 comments · May be fixed by #7494
Open

Add Jest configuration for snapshotresolver #6532

akuji1993 opened this issue Feb 27, 2019 · 21 comments · May be fixed by #7494

Comments

@akuji1993
Copy link

As I understand, right now CRA only supports a handful of Jest configuration overrides, either by adding them to package.json or adding a jest.config.js to your project.

First question would be, why are you not allowing to just add a jest.config.js and read all of the configuration variables that Jest provides usually, why add just a few of them?

And the more important suggestion, can you add snapshotresolver to this list of allowed customizations? https://jestjs.io/docs/en/configuration#snapshotresolver-string

It has been added with Jest 24 and would really help clean up the codebase a bit, since I don't think it's necessary to have generated code right next to my .tsx, .scss and .test.ts files.. If not, could you at least explain, how the decision was made to not just check for a jest.config.js and then give it to the test runner, so the dev can decide what they want to override or not.

@avaleriani
Copy link

This functionality would be really useful.

@stale
Copy link

stale bot commented Apr 12, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Apr 12, 2019
@akuji1993
Copy link
Author

I'd really like to have a reaction to this.

@stale stale bot removed the stale label Apr 12, 2019
@jareware
Copy link

jareware commented May 3, 2019

Was about to open this issue, but was happy to find it here already! Similar to #3116, this could be a pretty simple fix.

@akuji1993
Copy link
Author

I just checked the source code and this shouldn't be hard to implement. I will try to put together a pull request for this, should be a no brainer.

@stale
Copy link

stale bot commented Jun 2, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jun 2, 2019
@jareware
Copy link

jareware commented Jun 4, 2019

Bumping to avoid staleness; still very much looking forward to a solution!

@stale stale bot removed the stale label Jun 4, 2019
@stale
Copy link

stale bot commented Jul 4, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jul 4, 2019
@jareware
Copy link

jareware commented Jul 9, 2019

Still interested!

@stale stale bot removed the stale label Jul 9, 2019
@stale
Copy link

stale bot commented Aug 8, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@akuji1993
Copy link
Author

Hopefully I did everything right, this is my first PR into any large repository.

@jamesopti
Copy link

Is there any opposition from the CRA team to allowing all options specified in a jest.config.js file to be used and override the defaults? I don't see the harm.

@orlandovallejos
Copy link

any news about this?

@akuji1993
Copy link
Author

Nobody seems to look at the Merge Request.

@philwindsor
Copy link

Is there any work around for getting this to work with CRA (without the PR)?

@efranca
Copy link

efranca commented Oct 14, 2020

didnt it go ahead? It'd be very very useful!!!

@ksk385
Copy link

ksk385 commented Mar 4, 2021

Still interested in this - any update on when it will be added?

@jslmariano
Copy link

jslmariano commented Jul 22, 2021

It seems like the PR has been tagged as an enhancement :( It'll be so soon

@DjellalAbdou
Copy link

I was going to do the same PR until I stumbled on this, it really should be merged, a nice feature to add, and a well-needed one to make folders structure neater.

@sullrich84
Copy link

Any maintainer feedback on this on?

@billwatson017
Copy link

any support in the future for this feature request?

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

Successfully merging a pull request may close this issue.