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

Add tests for %WrapForValidIteratorPrototype%.return() from Iterator Helpers Proposal #4214

Conversation

sosukesuzuki
Copy link
Contributor

While implementing Iterator.from in WebKit1, I noticed that nearly all test262 test cases pass without implementing %WrapForValidIteratorPrototype%.return()2.

Although this method is not particularly complex, I believe there should be minimal tests for it.

This PR adds tests for %WrapForValidIteratorPrototype%.return().

Footnotes

  1. https://github.com/WebKit/WebKit/pull/32741

  2. https://tc39.es/proposal-iterator-helpers/#sec-wrapforvaliditeratorprototype.return

@sosukesuzuki sosukesuzuki changed the title Add tests for %WrapForValidIteratorPrototype%.return() Add tests for %WrapForValidIteratorPrototype%.return() from Iterator Helpers Proposal Aug 30, 2024
@sosukesuzuki sosukesuzuki force-pushed the add-test-for-WrapForValidIteratorPrototype-return branch from f797595 to f617443 Compare August 30, 2024 09:10
@sosukesuzuki sosukesuzuki marked this pull request as ready for review August 30, 2024 09:18
@sosukesuzuki sosukesuzuki requested a review from a team as a code owner August 30, 2024 09:18
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.

Thanks for the tests!

@sosukesuzuki
Copy link
Contributor Author

@ptomato Thank you for your review! I've addressed all of your comments.

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.

Thanks!

- Remove unused `flags
- Do not use `deepEqual.js`
- Assert `return` never got when `this` value is invalid
- Use `TemporalHelpers` to observer get / call
@ptomato ptomato force-pushed the add-test-for-WrapForValidIteratorPrototype-return branch from 21273ca to 64326e8 Compare September 13, 2024 18:37
@ptomato ptomato merged commit 8cbcc30 into tc39:main Sep 13, 2024
8 checks passed
@sosukesuzuki sosukesuzuki deleted the add-test-for-WrapForValidIteratorPrototype-return branch September 14, 2024 02:01
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