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

Fix Array.from, entries, spread and other iterator related methods #927

Merged
merged 8 commits into from Jul 11, 2021

Conversation

KurtGokhan
Copy link
Contributor

@KurtGokhan KurtGokhan commented Jul 10, 2021

Summary of fixes:

  • Added Symbol.iterator to iterator objects
  • Added String trimLeft and trimRight. They are the same as trimStart and trimEnd according to MDN
  • Fixed Array.from, entries, spread syntax
    • Removed ExtractValueFromIteratorInstance method. It was causing trouble for nested arrays. I think it was added mistakenly because of the bug in entries
  • Added Babel test which helped me catch all these errors

I was surprised that no tests fail because of entries change. Maybe there was no test coverage for that?

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

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

Great fixes, thank you! I tried with newer test262 test suite and some untested paths but none did show these problems so I guess the official test suite is just missing the coverage (or I can't find the correct place). Thanks for adding the missing coverage 👍🏻

@lahma lahma merged commit ed4e82c into sebastienros:main Jul 11, 2021
@KurtGokhan KurtGokhan deleted the missing-property-fixes branch July 11, 2021 10:44
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.

None yet

2 participants