Skip to content

Add tests for rejected %AsyncIteratorPrototype%.@@asyncDispose #4469

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

sosukesuzuki
Copy link
Contributor

We have basic tests for %AsyncIteratorPrototype%.@@asyncDispose but it does not include tests for rejection.

This PR adds 3 tests for rejected %AsyncIteratorPrototype%.@@asyncDispose:

  1. When return getter throws
  2. When return method throws
  3. When return method rejects

@sosukesuzuki sosukesuzuki requested a review from a team as a code owner May 6, 2025 12:23
@sosukesuzuki sosukesuzuki force-pushed the add-throw-tests-for-async-dispose branch from deea56a to eb3ce89 Compare May 6, 2025 12:28
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

LGTM. Before merging, could you please check if these tests duplicate any that are left in #3866?

@sosukesuzuki
Copy link
Contributor Author

@ptomato Thank you for review! #3866 includes only following two tests for AsyncIteratorPrototype.@@asyncDispose:

  1. return-val.js
  2. invokes-return.js

These tests are not related promise rejection. So I believe this PR makes sense :)

@ptomato ptomato force-pushed the add-throw-tests-for-async-dispose branch from eb3ce89 to b28d727 Compare May 14, 2025 15:34
@ptomato ptomato merged commit 5e20164 into tc39:main May 14, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants