From 1e18d830e60d062aae222bd8931aca01fc683136 Mon Sep 17 00:00:00 2001 From: Henri <36606108+Henqi@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:51:05 +0200 Subject: [PATCH] Update mocking-an-event-handler.md fix typo --- docs/mocking-an-event-handler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mocking-an-event-handler.md b/docs/mocking-an-event-handler.md index 14b43e3..821793c 100644 --- a/docs/mocking-an-event-handler.md +++ b/docs/mocking-an-event-handler.md @@ -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