mirror of
https://github.com/tc39/test262.git
synced 2025-12-03 03:53:08 +01:00
25 lines
602 B
JavaScript
25 lines
602 B
JavaScript
// Copyright (C) 2025 Kevin Gibbons. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-iterator.zip
|
|
description: >
|
|
Throws a TypeError when the "iterables" argument is not iterable.
|
|
features: [joint-iteration]
|
|
---*/
|
|
|
|
var invalidIterables = [
|
|
Object.create(null),
|
|
Object.create(null, {
|
|
next: { value: function(){} },
|
|
return: { value: function(){} },
|
|
}),
|
|
];
|
|
|
|
// Throws a TypeError for invalid iterables values.
|
|
for (var iterables of invalidIterables) {
|
|
assert.throws(TypeError, function() {
|
|
Iterator.zip(iterables);
|
|
});
|
|
}
|