mirror of
https://github.com/tc39/test262.git
synced 2025-11-29 10:03:35 +01:00
24 lines
676 B
JavaScript
24 lines
676 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.zipKeyed
|
|
description: >
|
|
Accepts String objects as inputs.
|
|
includes: [compareArray.js]
|
|
features: [joint-iteration]
|
|
---*/
|
|
|
|
var result = Array.from(Iterator.zipKeyed({
|
|
a: Object("abc"),
|
|
b: Object("123"),
|
|
}));
|
|
|
|
assert.sameValue(result.length, 3);
|
|
result.forEach(function (object) {
|
|
assert.compareArray(Object.keys(object), ["a", "b"]);
|
|
});
|
|
assert.compareArray(Object.values(result[0]), ["a", "1"]);
|
|
assert.compareArray(Object.values(result[1]), ["b", "2"]);
|
|
assert.compareArray(Object.values(result[2]), ["c", "3"]);
|