-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Labels
new ruleNew rule to be included in the pluginNew rule to be included in the pluginreleasedreleased on @beta
Milestone
Description
Following the proposed for Kent at his post (https://kentcdodds.com/blog/common-mistakes-with-react-testing-library). I would like to suggest a new rule that detects side effects inside a wait-for:
❌ // wrong
await waitFor(() => {
fireEvent.click(a)
expect(b).toEqual('b')
})
✅ // correct
fireEvent.click(a)
await waitFor(() => expect(b).toEqual('b'))
nickserv
Metadata
Metadata
Assignees
Labels
new ruleNew rule to be included in the pluginNew rule to be included in the pluginreleasedreleased on @beta