tests for Iterator.prototype.join#4768
Open
bakkot wants to merge 1 commit into
Open
Conversation
14 tasks
linusg
reviewed
Dec 8, 2025
| Iterator.prototype.join.call(it, throwy); | ||
| }); | ||
|
|
||
| assert.sameValue(gotNext, false); |
Member
There was a problem hiding this comment.
Suggested change
| assert.sameValue(gotNext, false); | |
| assert(!gotNext); |
?
Member
Author
There was a problem hiding this comment.
Arguably this is more readable in terms of the failures you get. Certainly it is not worse. In any case I don't think it's worth changing.
| var coercible = { | ||
| toString: function () { | ||
| if (called) { | ||
| throw new Test262Error('toString should be called exactly once'); |
Member
There was a problem hiding this comment.
To assert exactly-once behaviour, I would just use a counter and assert on the counter at the end.
Member
Author
There was a problem hiding this comment.
That is also a valid way to do it but I'm happy with this as-is.
michaelficarra
approved these changes
Apr 9, 2026
lando-worker Bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Apr 28, 2026
These are from tc39/test262#4768 which is currently under review. Once the tests land upstream, these can be removed. This will be handled as part of shipping the feature when it reaches Stage 3. Differential Revision: https://phabricator.services.mozilla.com/D296726
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #4697.
Tested against a polyfill.