-
Notifications
You must be signed in to change notification settings - Fork 468
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 initial tests for the "iterator-sequencing" proposal #4326
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost all of these tests pass verbatim on my polyfill, which is great!
I've commented the ones that don't - I assume they represent bugs in my polyfill, but I'll do a deep dive on the spec text to make sure.
update: one set of them was a bug that disappeared when i rewrote the implementation to match the spec text.
test/built-ins/Iterator/concat/throws-typeerror-when-generator-is-running-return.js
Show resolved
Hide resolved
test/built-ins/Iterator/concat/throws-typeerror-when-iterable-not-an-object.js
Show resolved
Hide resolved
assert.sameValue(iterResult.done, false); | ||
assert.sameValue(iterResult.value, 123); | ||
|
||
assert.notSameValue(iterResult, oldIterResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessarily wasteful. I've opened an issue to reconsider this behaviour: tc39/proposal-iterator-sequencing#17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise! Thanks for writing these, @anba.
I pushed up a couple of commits. This LGTM now, modulo the normative question which we can resolve at the upcoming plenary. |
…roposal. r=mgaudet Test PR: tc39/test262#4326 Differential Revision: https://phabricator.services.mozilla.com/D229014
Tests are based on existing tests in "test/built-ins/Iterator".