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

jest.restoreAllMocks is not a function #4436

Closed
kentor opened this issue Sep 6, 2017 · 2 comments · Fixed by #4463
Closed

jest.restoreAllMocks is not a function #4436

kentor opened this issue Sep 6, 2017 · 2 comments · Fixed by #4463

Comments

@kentor
Copy link
Contributor

kentor commented Sep 6, 2017

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Getting jest.restoreAllMocks is not a function in Jest 21.0.1 when trying to run jest.restoreAllMocks()

What is the expected behavior?
jest.restoreAllMocks is in the docs so I expect it to work?

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Jest 21.0.1, node 8.4, yarn 27

@isanchen
Copy link

isanchen commented Sep 6, 2017

Same here, Jest 21.0.1, node 8.4.0.

Searched in source and restoreAllMocks can be found nowhere.

Please fix.

As a work around, we have to call .mockRestore() on every single spy created. 🤦‍♂️

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants