Skip to content

fix: catch handles promise #1059

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
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

puglyfe
Copy link
Contributor

@puglyfe puglyfe commented Aug 8, 2025

Checks

Changes

  • replaces hasChainedThen with hasChainedPromiseHandler in the isPromiseHandled logic
  • adds tests to all async rules that utilize this code path

I'm a bit curious if there's a reason why this pattern wasn't supported previously. I know it's possible to rewrite tests to use async matchers, but this seems like something that the plugin should allow. Let me know if there's something I'm not considering here...

edit: github cached the PR title from my previous contribution 🤔 not sure what happened there.

Context

closes #1058

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.47%. Comparing base (2e7e1b6) to head (48eeefc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1059   +/-   ##
=======================================
  Coverage   96.46%   96.47%           
=======================================
  Files          50       50           
  Lines        2687     2693    +6     
  Branches     1112     1116    +4     
=======================================
+ Hits         2592     2598    +6     
  Misses         95       95           

☔ 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.

@puglyfe puglyfe changed the title fix: handled promises assigned to vars are valid fix: catch handles promise Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promises with catch are not considered handled
1 participant