Skip to content

Commit

Permalink
Update 24.x
Browse files Browse the repository at this point in the history
  • Loading branch information
saylerb committed Apr 30, 2019
1 parent b8968ae commit ae0c2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/versioned_docs/version-24.0/MockFunctionAPI.md
Expand Up @@ -99,7 +99,7 @@ Does everything that [`mockFn.mockReset()`](#mockfnmockreset) does, and also res

This is useful when you want to mock functions in certain test cases and restore the original implementation in others.

Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`.
Beware that `mockFn.mockRestore` only works when the mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`.

The [`restoreMocks`](configuration.html#restoremocks-boolean) configuration option is available to restore mocks automatically between tests.

Expand Down

0 comments on commit ae0c2b0

Please sign in to comment.