Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/mocking-an-event-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ test('when clicked, calls onClick with productId', async () => {
In this approach we only mock one function in the CartService module. This is
done using
[jest.spyOn](https://jestjs.io/docs/jest-object#jestspyonobject-methodname).
`jest.synOn` creates a mock function similar to `jest.fn` but also tracks calls
`jest.spyOn` creates a mock function similar to `jest.fn` but also tracks calls
to the specified method. For example:

```tsx
Expand Down