From 5f4c69376461b6033efd3279f98036cc7c9f14f5 Mon Sep 17 00:00:00 2001 From: Michael Gwynne Date: Fri, 25 Jun 2021 19:47:55 +0100 Subject: [PATCH] Correct example --- docs/react-testing-library/cheatsheet.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/react-testing-library/cheatsheet.mdx b/docs/react-testing-library/cheatsheet.mdx index ada4d786a..aec08e69c 100644 --- a/docs/react-testing-library/cheatsheet.mdx +++ b/docs/react-testing-library/cheatsheet.mdx @@ -21,7 +21,7 @@ test('loads items eventually', async () => { render() // Click button - fireEvent.click(getByText('Load')) + fireEvent.click(screen.getByText('Load')) // Wait for page to update with query text const items = await screen.findAllByText(/Item #[0-9]: /)