Open
Description
Name for new rule
no-flush
Description of the new rule
The goal of this rule would be preventing any flush attempt, like await act(() => Promise.resolve())
.
I can't think of any other flush mechanism in Testing Library for now, so we can start reporting the previous scenario and add more in the future if needed.
Testing Library feature
Appearance and Disappearance. Usually, dealing with async behaviors is a matter of waiting for something in the UI to appear/disappear.
Testing Library framework(s)
All of them.
What category of rule is this?
Warns about a potential error
Optional: other category of rule
No response
Code examples
await act(() => Promise.resolve())
Anything else?
No response
Do you want to submit a pull request to make the new rule?
Yes