Skip to content

Commit be54187

Browse files
authored
docs: Use getByText bound to screen (#870)
1 parent ebb4a6b commit be54187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/react-testing-library/cheatsheet.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test('loads items eventually', async () => {
2121
render(<Page />)
2222

2323
// Click button
24-
fireEvent.click(getByText('Load'))
24+
fireEvent.click(screen.getByText('Load'))
2525

2626
// Wait for page to update with query text
2727
const items = await screen.findAllByText(/Item #[0-9]: /)

0 commit comments

Comments
 (0)