Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(await-async-event): prevent adding async/await in forEach loops #1075

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

Open
y-hsgw wants to merge 2 commits into testing-library:main
base: main
Choose a base branch
Loading
from y-hsgw:fix/await-async-events

Conversation

Copy link
Member

@y-hsgw y-hsgw commented Sep 3, 2025
edited
Loading

Checks

Changes

  • add support for handling forEach in async event method detection

Context

Fixes #843

Copy link

codecov bot commented Sep 3, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.42%. Comparing base (bef5e4b) to head (5d0ec0d).

Additional details and impacted files
@@ Coverage Diff @@
## main #1075 +/- ##
=======================================
 Coverage 96.41% 96.42% 
=======================================
 Files 50 50 
 Lines 2679 2683 +4 
 Branches 1099 1105 +6 
=======================================
+ Hits 2583 2587 +4 
 Misses 96 96 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const deepestCalleeIdentifier = getDeepestIdentifierNode(
functionExpression.parent
);
if (deepestCalleeIdentifier?.name === 'forEach') {

This comment was marked as resolved.

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Belco90 Belco90 Awaiting requested review from Belco90

1 more reviewer

@bonkevin bonkevin bonkevin left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

await-async-event adds async and await in forEach loop
2 participants

AltStyle によって変換されたページ (->オリジナル) /