You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{render,screen}from'@testing-library/react'importuserEventfrom'@testing-library/user-event'
...
// click the button to reload the pageconstreloadPageButton=screen.getByText('Reload page')userEvent.click(reloadPageButton)
Name for new rule
await-user-event
Description of the new rule
Now that the
userEvent
's methods are all async (withv14
), wouldn't it make sense to add a rule to enforeawait
when using them?A similar rule already exists for awaiting
fireEvent
.Testing Library feature
All usage of
userEvent
withv14
.Testing Library framework(s)
I guess all of them?
What category of rule is this?
Warns about a potential error
Code examples
Instead, it should enforce using
await
:Anything else?
I'm not sure if this is even possible to integrate, as this rule should only be active for
userEvent
usage ofv14
.Do you want to submit a pull request to make the new rule?
No
The text was updated successfully, but these errors were encountered: