Skip to content

Set resetMocks to true by default in jest config - #7899

Merged
ianschmitz merged 1 commit into
react:masterfrom
alexkrolick:patch-2
May 4, 2020
Merged

Set resetMocks to true by default in jest config#7899
ianschmitz merged 1 commit into
react:masterfrom
alexkrolick:patch-2

Conversation

@alexkrolick

@alexkrolickalexkrolick commented Oct 29, 2019

Copy link
Copy Markdown
Contributor

See also jestjs/jest#9047

@alexkrolick

Copy link
Copy Markdown
ContributorAuthor

I think this would be a breaking change

@kentcdodds

Copy link
Copy Markdown
Contributor

I agree with this PR. But I wouldn't hold up #7881 for this. You can definitely use React Testing Library without this enabled.

@ianschmitz

Copy link
Copy Markdown
Contributor

Agreed. I have always set this to true in my jest config of my CRA apps after creation. Populating the jest config in the package.json by default in our bootstrapped apps could accomplish this as a non-breaking change.

I'm for it, let's see what the other maintainers think.

@alexkrolick

Copy link
Copy Markdown
ContributorAuthor

I'm still all for this change

@ianschmitz
ianschmitz merged commit 4974a20 into react:masterMay 4, 2020
@alexkrolick
alexkrolick deleted the patch-2 branch May 4, 2020 03:25
@locklockBot locked and limited conversation to collaborators May 20, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@alexkrolick@kentcdodds@ianschmitz@facebook-github-bot