Skip to content

Commit

Permalink
fix copy paste artifact: restoring -> resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordfirespeed committed Aug 29, 2024
1 parent dc736d6 commit d8f5d9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/mock.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ await asyncMock() // throws "Async error"
Does what `mockClear` does and resets inner implementation to the original function.
This also resets all "once" implementations.

Note that restoring a mock from `vi.fn()` will set implementation to an empty function that returns `undefined`.
Restoring a mock from `vi.fn(impl)` will restore implementation to `impl`.
Note that resetting a mock from `vi.fn()` will set implementation to an empty function that returns `undefined`.
resetting a mock from `vi.fn(impl)` will restore implementation to `impl`.

This is useful when you want to reset a mock to its original state.

Expand Down

0 comments on commit d8f5d9d

Please sign in to comment.