groupBy: fix throwing iterator tests

Fixes #3852
This commit is contained in:
Jordan Harband 2023-06-13 19:56:17 -07:00
parent 55658a4fa2
commit c5b24c64c3
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
2 changed files with 8 additions and 2 deletions

View File

@ -15,10 +15,13 @@ info: |
b. Let next be ? IteratorStep(iteratorRecord).
...
features: [array-grouping, Map]
features: [array-grouping, Map, Symbol.iterator]
---*/
const throwingIterator = {
[Symbol.iterator]: function () {
return this;
},
next: function next() {
throw new Test262Error('next() method was called');
}

View File

@ -15,10 +15,13 @@ info: |
b. Let next be ? IteratorStep(iteratorRecord).
...
features: [array-grouping]
features: [array-grouping, Symbol.iterator]
---*/
const throwingIterator = {
[Symbol.iterator]: function () {
return this;
},
next: function next() {
throw new Test262Error('next() method was called');
}