Skip to content

fix(no-wait-for-side-effects): detect await expressions #1008

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

Conversation

StyleShit
Copy link
Contributor

@StyleShit StyleShit commented May 15, 2025

Closes #742

@StyleShit StyleShit force-pushed the fix/742-get-property-identifier-node-await-expression branch from 87f42ea to bb3ced4 Compare May 15, 2025 11:20
@StyleShit StyleShit changed the title fix: no-wait-for-side-effects doesn't detect await expression fix: no-wait-for-side-effects doesn't detect await expressions May 15, 2025
Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.29%. Comparing base (26d360e) to head (1e27b58).
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1008      +/-   ##
==========================================
+ Coverage   96.27%   96.29%   +0.01%     
==========================================
  Files          46       47       +1     
  Lines        2472     2483      +11     
  Branches     1025     1027       +2     
==========================================
+ Hits         2380     2391      +11     
  Misses         92       92              

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

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this bug!

I see code coverage went down, so Codecov complains. Can you add extra tests for no-wait-for-multiple-assertions? It's indirectly affected (see more details).

@Belco90 Belco90 changed the title fix: no-wait-for-side-effects doesn't detect await expressions fix(no-wait-for-side-effects): detect await expressions May 16, 2025
@Belco90 Belco90 added the bug Something isn't working label May 16, 2025
@StyleShit StyleShit requested a review from Belco90 May 25, 2025 17:53
@StyleShit
Copy link
Contributor Author

StyleShit commented May 25, 2025

Thanks for addressing this bug!

I see code coverage went down, so Codecov complains. Can you add extra tests for no-wait-for-multiple-assertions? It's indirectly affected (see more details).

there was a redundant isExpressionStatement check in the code that filtered await expressions before they have been checked

On a side note - the CI is so fast, I like it! 🚀

@Belco90
Copy link
Member

Belco90 commented May 26, 2025

On a side note - the CI is so fast, I like it! 🚀

I'm glad you like the CI speed! We can do even better, hopefully we can switch to vitest soon.

@Belco90 Belco90 merged commit e4c0daa into testing-library:main May 26, 2025
31 checks passed
Copy link

🎉 This PR is included in version 7.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to detect no-wait-for-side-effects when used in conjunction with await
2 participants