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

Enable restoreMocks Jest setting #794

Merged
merged 2 commits into from
Apr 21, 2022
Merged

Enable restoreMocks Jest setting #794

merged 2 commits into from
Apr 21, 2022

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Apr 21, 2022

The restoreMocks Jest setting has been enabled, which will automatically restore any mocks created using Jest after each test. See here for more information: https://jestjs.io/docs/configuration#restoremocks-boolean

Note that this will not affect standalone Jest mocks. It only affects mocks that replace a method/field on a pre-existing object.

A manual mock restoration was removed from the CurrencyRateController tests, as the mock should now be restored automatically instead.

The `restoreMocks` Jest setting has been enabled, which will
automatically restore any mocks created using Jest after each test. See
here for more information: https://jestjs.io/docs/configuration#restoremocks-boolean

Note that this will not affect standalone Jest mocks. It only affects
mocks that replace a method/field on a pre-existing object.

A manual mock restoration was removed from the CurrencyRateController
tests, as the mock should now be restored automatically instead.
@Gudahtt Gudahtt marked this pull request as ready for review April 21, 2022 21:32
@Gudahtt Gudahtt requested a review from a team as a code owner April 21, 2022 21:32
@Gudahtt Gudahtt merged commit 814c99d into main Apr 21, 2022
@Gudahtt Gudahtt deleted the enable-restore-mocks branch April 21, 2022 21:50
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The `restoreMocks` Jest setting has been enabled, which will
automatically restore any mocks created using Jest after each test. See
here for more information: https://jestjs.io/docs/configuration#restoremocks-boolean

Note that this will not affect standalone Jest mocks. It only affects
mocks that replace a method/field on a pre-existing object.

A manual mock restoration was removed from the CurrencyRateController
tests, as the mock should now be restored automatically instead.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The `restoreMocks` Jest setting has been enabled, which will
automatically restore any mocks created using Jest after each test. See
here for more information: https://jestjs.io/docs/configuration#restoremocks-boolean

Note that this will not affect standalone Jest mocks. It only affects
mocks that replace a method/field on a pre-existing object.

A manual mock restoration was removed from the CurrencyRateController
tests, as the mock should now be restored automatically instead.
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 this pull request may close these issues.

2 participants