Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

await-async-event adds async and await in forEach loop #843

Open
fa93hws opened this issue Nov 13, 2023 · 0 comments
Open

await-async-event adds async and await in forEach loop #843

fa93hws opened this issue Nov 13, 2023 · 0 comments
Labels
bug Something isn't working triage Pending to be triaged by a maintainer

Comments

@fa93hws
Copy link

fa93hws commented Nov 13, 2023

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

foo.forEach(() => {
  userEvent.click();
});

After autofix, it becomes

foo.forEach(async () => {
  await userEvent.click();
});

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

@fa93hws fa93hws added bug Something isn't working triage Pending to be triaged by a maintainer labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Pending to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant