From 2e6a371f71e705f6260ad631e6f6b8b9bc72ac0f Mon Sep 17 00:00:00 2001 From: Caio Lima Date: Mon, 27 Jan 2020 13:40:16 -0300 Subject: [PATCH] Adding missing 'zip' function --- .../prototype/formatRangeToParts/fractionalSecondDigits.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js b/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js index aa931207e1..92b76a11fc 100644 --- a/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js +++ b/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js @@ -8,6 +8,13 @@ features: [Intl.DateTimeFormat-fractionalSecondDigits, Intl.DateTimeFormat-forma locale: [en-US] ---*/ +function* zip(a, b) { + assert.sameValue(a.length, b.length); + for (let i = 0; i < a.length; ++i) { + yield [i, a[i], b[i]]; + } +} + function compare(actual, expected) { for (const [i, actualEntry, expectedEntry] of zip(actual, expected)) { assert.sameValue(actualEntry.type, expectedEntry.type, `type for entry ${i}`);