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

Update test setup to reset and restore all mocks between each test #745

Closed
mcmire opened this issue Mar 23, 2022 · 1 comment · Fixed by #4417
Closed

Update test setup to reset and restore all mocks between each test #745

mcmire opened this issue Mar 23, 2022 · 1 comment · Fixed by #4417
Assignees
Labels

Comments

@mcmire
Copy link
Contributor

mcmire commented Mar 23, 2022

Currently we are not setting resetMocks: true and restoreMocks: true within jest.config.js. We should enable this and remove calls to jest.clearAllMocks() and jest.resetAllMocks() within test files.

Note that this may require substantial changes for any test suites that rely heavily upon shared mocks.

@mcmire mcmire mentioned this issue Mar 23, 2022
49 tasks
@mcmire mcmire changed the title Reset and restore all mocks between each test. Update test setup to reset and restore all mocks between each test Mar 23, 2022
@Gudahtt Gudahtt added the enhancement New feature or request label May 3, 2024
@Gudahtt
Copy link
Member

Gudahtt commented May 3, 2024

Update: We are setting restoreMocks today. But not resetMocks.

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

Successfully merging a pull request may close this issue.

3 participants