Last active
January 4, 2023 01:38
-
-
Save arvinsim/87a66fa3dccc396adab1f4c704ec6c84 to your computer and use it in GitHub Desktop.
Common React Testing Library features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup user events | |
const user = userEvent.setup() | |
// Clicking on an element. Using await is important | |
await user.click(screen.getTextBy('Some button')) | |
// Output HTML of screen | |
screen.debug() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment