Skip to content

Commit ae3ff0a

Browse files
authored
Merge pull request #4786 from husseinIsmail/fix-writing-tests-docs
Fix code block example for Writing Integration Tests With Components
2 parents 61647ff + f9c8abc commit ae3ff0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/usage/WritingTests.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ test('fetches & receives a user after clicking the fetch user button', async ()
608608

609609
// after clicking the 'Fetch user' button, it should now show that it is fetching the user
610610
fireEvent.click(screen.getByRole('button', { name: /Fetch user/i }))
611-
expect(screen.getByText(/no user/i)).toBeInTheDocument()
611+
expect(screen.queryByText(/no user/i)).not.toBeInTheDocument()
612+
expect(screen.getByText(/Fetching user\.\.\./i)).toBeInTheDocument()
612613

613614
// after some time, the user should be received
614615
expect(await screen.findByText(/John Smith/i)).toBeInTheDocument()

0 commit comments

Comments
 (0)