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

[v4] What else has been changed in testing ? #9876

Open
MalekBouba opened this issue Oct 23, 2020 · 5 comments
Open

[v4] What else has been changed in testing ? #9876

MalekBouba opened this issue Oct 23, 2020 · 5 comments

Comments

@MalekBouba
Copy link

I upgraded react-scripts in my project from version 3.4.x to 4.0.0 and testing isn't like before.

I read the changelog, you said that you've upgraded to Jest 26 and now set resetMocks to true by default in the Jest config! (hmm, this isn't expected), so, I added:

"resetMocks": false,

to make my tests work again. I fixed some other new Eslint warning (and that's okay)...
BUT, Now it covers only a part of the test suits!
I have 420 tests (551 suites) in the project,

"test": "react-scripts test --coverage --watchAll=true",

runs only 118 (25 suites)!

Thanks!

@mrmckeb
Copy link
Contributor

mrmckeb commented Oct 23, 2020

Can you please try setting watchAll to false and let me know if that changes anything?

@MalekBouba
Copy link
Author

MalekBouba commented Oct 23, 2020

It works fine with watchAll set to false! thanks!
BUT, is that a bug or what!? we need the watchAll after all 😭

@MalekBouba MalekBouba changed the title What else has been changed in testing at 4.0.0 What else has been changed in testing at 4.0.0 ? Oct 23, 2020
@MalekBouba MalekBouba changed the title What else has been changed in testing at 4.0.0 ? [v4] What else has been changed in testing ? Oct 23, 2020
@chrkaatz
Copy link

I am getting: "Nothing was returned from render"

@otaciliolacerda
Copy link

@chrkaatz maybe is related to this issue in jest?

@stale
Copy link

stale bot commented Dec 25, 2020

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 Dec 25, 2020
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