Skip to content

Commit

Permalink
https://github.com/tc39/proposal-iterator-helpers/pull/274
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed May 22, 2023
1 parent 2cd18e6 commit 1725372
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
Expand Up @@ -12,6 +12,8 @@ info: |
features: [iterator-helpers]
flags: []
---*/
let iter = Iterator.prototype.drop.call({ next: 0 }, 1);

assert.throws(TypeError, function() {
Iterator.prototype.drop.call({ next: 0 }, 1);
iter.next();
});
Expand Up @@ -12,6 +12,8 @@ info: |
features: [iterator-helpers]
flags: []
---*/
let iter = Iterator.prototype.filter.call({ next: 0 }, () => true);

assert.throws(TypeError, function() {
Iterator.prototype.filter.call({ next: 0 }, () => true);
iter.next();
});
Expand Up @@ -10,6 +10,8 @@ info: |
features: [iterator-helpers]
flags: []
---*/
let iter = Iterator.prototype.flatMap.call({ next: 0 }, () => []);

assert.throws(TypeError, function() {
Iterator.prototype.flatMap.call({ next: 0 }, () => []);
iter.next();
});
Expand Up @@ -10,6 +10,8 @@ info: |
features: [iterator-helpers]
flags: []
---*/
let iter = Iterator.prototype.map.call({ next: 0 }, () => 0);

assert.throws(TypeError, function() {
Iterator.prototype.map.call({ next: 0 }, () => 0);
iter.next();
});
Expand Up @@ -12,6 +12,8 @@ info: |
features: [iterator-helpers]
flags: []
---*/
let iter = Iterator.prototype.take.call({ next: 0 }, 1);

assert.throws(TypeError, function() {
Iterator.prototype.take.call({ next: 0 }, 1);
iter.next();
});

0 comments on commit 1725372

Please sign in to comment.