Open fa93hws opened 10 months ago
Yes
v6.1.2
v8.45.0
20.8.1
yarn 1.22.19
macos 13.6.1
async and await doesn't work for forEach loop. I think we should give up autofixing this issue.
forEach
foo.forEach(() => { userEvent.click(); });
After autofix, it becomes
foo.forEach(async () => { await userEvent.click(); });
No response
{ ... "testing-library/await-async-event": "error", }
await-async-event
Have you read the Troubleshooting section?
Yes
Plugin version
v6.1.2
ESLint version
v8.45.0
Node.js version
20.8.1
package manager and version
yarn 1.22.19
Operating system
macos 13.6.1
Bug description
async and await doesn't work for
forEach
loop. I think we should give up autofixing this issue.Steps to reproduce
After autofix, it becomes
Error output/screenshots
No response
ESLint configuration
{ ... "testing-library/await-async-event": "error", }
Rule(s) affected
await-async-event
Anything else?
No response
Do you want to submit a pull request to fix this bug?
Yes