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

docs: usage with create-react-app now requires explicitly setting resetMocks: false #125

Closed
mfogel opened this issue Feb 22, 2021 · 1 comment · Fixed by #126
Closed

Comments

@mfogel
Copy link
Contributor

mfogel commented Feb 22, 2021

Hi, thanks for this package, appreciate you sharing your work.

Since create react app 4.0, the default jest config has resetMocks: true set.

This is a bit controversial because it breaks stuff (including this packge).... see facebook/create-react-app#9935 Personally I think they would have been better off to stay conservative and just set clearMocks: true.

In any case, it might be worth mentioning in the README for this package that:

  • setting resetMocks: true will break this package
  • when using create react app, you need to explicitly set resetMocks: false
@clarkbw
Copy link
Owner

clarkbw commented Feb 22, 2021

Thanks for the heads up in filing this issue!

If you wouldn't mind updating the README I think the two places that need mention are:

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants