Closed
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'))