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 initial tests for the "iterator-sequencing" proposal #4326

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

anba
Copy link
Contributor

@anba anba commented Nov 14, 2024

Tests are based on existing tests in "test/built-ins/Iterator".

@anba anba requested review from a team as code owners November 14, 2024 14:59
Copy link
Member

@ljharb ljharb left a 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.

ljharb added a commit to es-shims/iterator-helpers that referenced this pull request Nov 15, 2024
ljharb added a commit to es-shims/iterator-helpers that referenced this pull request Nov 15, 2024
ljharb added a commit to es-shims/iterator-helpers that referenced this pull request Nov 15, 2024
assert.sameValue(iterResult.done, false);
assert.sameValue(iterResult.value, 123);

assert.notSameValue(iterResult, oldIterResult);
Copy link
Member

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

Copy link
Member

@michaelficarra michaelficarra left a 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.

@michaelficarra
Copy link
Member

I pushed up a couple of commits. This LGTM now, modulo the normative question which we can resolve at the upcoming plenary.

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.

4 participants