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
The rule flagged and "fixed" a line containing both await waitFor and getByText, but there were other functions in between. The autofix removed those other functions, breaking my code.
Have you read the Troubleshooting section?
Yes
Plugin version
5.10.2
ESLint version
8.33.0
Node.js version
18.14.0
package manager and version
npm 8.15.0
Operating system
macOS Ventura 13.0.1
Bug description
The rule flagged and "fixed" a line containing both
await waitFor
andgetByText
, but there were other functions in between. The autofix removed those other functions, breaking my code.Steps to reproduce
await waitFor(() => expect(screen.getByText('foo')).toBeInTheDocument());
await screen.findByText('foo');
Error output/screenshots
No response
ESLint configuration
"extends": ["plugin:testing-library/react"]
Rule(s) affected
prefer-find-by
Anything else?
No response
Do you want to submit a pull request to fix this bug?
No
The text was updated successfully, but these errors were encountered: