diff --git a/docs/dom-testing-library/cheatsheet.mdx b/docs/dom-testing-library/cheatsheet.mdx index 7b6c74750..d5625d104 100644 --- a/docs/dom-testing-library/cheatsheet.mdx +++ b/docs/dom-testing-library/cheatsheet.mdx @@ -151,7 +151,7 @@ test('loads items eventually', async () => { fireEvent.click(getByText(node, 'Load')) // Wait for page to update with query text - const items = await findByText(node, /Item #[0-9]: /) + const items = await findAllByText(node, /Item #[0-9]: /) expect(items).toHaveLength(10) }) ```