diff --git a/test/built-ins/Array/prototype/group/array-like.js b/test/built-ins/Array/prototype/group/array-like.js index 07e9817aa6..42a7b085ae 100644 --- a/test/built-ins/Array/prototype/group/array-like.js +++ b/test/built-ins/Array/prototype/group/array-like.js @@ -24,7 +24,7 @@ const arrayLike = {0: 1, 1: 2, 2: 3, 3: 4, length: 3 }; let calls = 0; -const obj = Array.prototype.group.call(arrayLike, i => { calls++; return i % 2 === 0 ? 'even' : 'odd'; }); +const obj = Array.prototype.group.call(arrayLike, function (i) { calls++; return i % 2 === 0 ? 'even' : 'odd'; }); assert.sameValue(calls, 3, 'only calls length times'); assert.compareArray(Object.keys(obj), ['odd', 'even']); diff --git a/test/built-ins/Array/prototype/group/callback-arg.js b/test/built-ins/Array/prototype/group/callback-arg.js index 26eb04f4f2..5d38d65df7 100644 --- a/test/built-ins/Array/prototype/group/callback-arg.js +++ b/test/built-ins/Array/prototype/group/callback-arg.js @@ -25,7 +25,7 @@ const arr = [-0, 0, 1, 2, 3]; let calls = 0; -const map = arr.group((n, i, testArr) => { +const map = arr.group(function (n, i, testArr) { calls++; assert.sameValue(n, arr[i], "selected element aligns with index"); assert.sameValue(testArr, arr, "original array is passed as final argument"); diff --git a/test/built-ins/Array/prototype/group/emptyList.js b/test/built-ins/Array/prototype/group/emptyList.js index bbb3f8d0e7..366c12d08d 100644 --- a/test/built-ins/Array/prototype/group/emptyList.js +++ b/test/built-ins/Array/prototype/group/emptyList.js @@ -20,7 +20,7 @@ features: [array-grouping] const original = []; -const obj = original.group(() => { +const obj = original.group(function () { throw new Test262Error('callback function should not be called') }); diff --git a/test/built-ins/Array/prototype/group/evenOdd.js b/test/built-ins/Array/prototype/group/evenOdd.js index e12d83586f..6d22cb6940 100644 --- a/test/built-ins/Array/prototype/group/evenOdd.js +++ b/test/built-ins/Array/prototype/group/evenOdd.js @@ -21,7 +21,7 @@ features: [array-grouping] const array = [1, 2, 3]; -const obj = array.group(i => { +const obj = array.group(function (i) { return i % 2 === 0 ? 'even' : 'odd'; }); diff --git a/test/built-ins/Array/prototype/group/groupLength.js b/test/built-ins/Array/prototype/group/groupLength.js index 2bcd3c31b7..2123378e11 100644 --- a/test/built-ins/Array/prototype/group/groupLength.js +++ b/test/built-ins/Array/prototype/group/groupLength.js @@ -21,7 +21,7 @@ features: [array-grouping] const arr = ['hello', 'test', 'world']; -const obj = arr.group(i => i.length); +const obj = arr.group(function (i) { return i.length; }); assert.compareArray(Object.keys(obj), ['4', '5']); assert.compareArray(obj['5'], ['hello', 'world']); diff --git a/test/built-ins/Array/prototype/group/null-prototype.js b/test/built-ins/Array/prototype/group/null-prototype.js index 07665f0b82..c977ee39e4 100644 --- a/test/built-ins/Array/prototype/group/null-prototype.js +++ b/test/built-ins/Array/prototype/group/null-prototype.js @@ -19,7 +19,7 @@ features: [array-grouping] const array = [1, 2, 3]; -const obj = array.group(i => { +const obj = array.group(function (i) { return i % 2 === 0 ? 'even' : 'odd'; }); diff --git a/test/built-ins/Array/prototype/group/sparse-array.js b/test/built-ins/Array/prototype/group/sparse-array.js index 9d6557ee8c..ab794d169b 100644 --- a/test/built-ins/Array/prototype/group/sparse-array.js +++ b/test/built-ins/Array/prototype/group/sparse-array.js @@ -23,7 +23,7 @@ features: [array-grouping] let calls = 0; const array = [, , ,]; -const obj = array.group(() => { +const obj = array.group(function () { calls++; return 'key'; }); diff --git a/test/built-ins/Array/prototype/group/toPropertyKey.js b/test/built-ins/Array/prototype/group/toPropertyKey.js index bd8cfa796b..b14ad7488a 100644 --- a/test/built-ins/Array/prototype/group/toPropertyKey.js +++ b/test/built-ins/Array/prototype/group/toPropertyKey.js @@ -31,7 +31,7 @@ const stringable = { const array = [1, '1', stringable]; -const obj = array.group(v => v); +const obj = array.group(function (v) { return v; }); assert.compareArray(Object.keys(obj), ['1']); assert.compareArray(obj['1'], [1, '1', stringable]); diff --git a/test/built-ins/Array/prototype/groupToMap/array-like.js b/test/built-ins/Array/prototype/groupToMap/array-like.js index e855abb90d..a9686063d3 100644 --- a/test/built-ins/Array/prototype/groupToMap/array-like.js +++ b/test/built-ins/Array/prototype/groupToMap/array-like.js @@ -17,14 +17,14 @@ info: | ... includes: [compareArray.js] -features: [array-grouping] +features: [array-grouping, Map, Symbol.iterator] ---*/ const arrayLike = {0: 1, 1: 2, 2: 3, 3: 4, length: 3 }; let calls = 0; -const map = Array.prototype.groupToMap.call(arrayLike, i => { +const map = Array.prototype.groupToMap.call(arrayLike, function (i) { calls++; return i % 2 === 0 ? 'even' : 'odd'; }); diff --git a/test/built-ins/Array/prototype/groupToMap/callback-arg.js b/test/built-ins/Array/prototype/groupToMap/callback-arg.js index acaafea2d6..6f6a38a2e1 100644 --- a/test/built-ins/Array/prototype/groupToMap/callback-arg.js +++ b/test/built-ins/Array/prototype/groupToMap/callback-arg.js @@ -15,7 +15,7 @@ info: | c. Let key be ? Call(callbackfn, thisArg, « kValue, 𝔽(k), O »). e. Perform ! AddValueToKeyedGroup(groups, key, kValue). ... -features: [array-grouping] +features: [array-grouping, Map] ---*/ @@ -23,7 +23,7 @@ const arr = [-0, 0, 1, 2, 3]; let calls = 0; -arr.groupToMap((n, i, testArr) => { +arr.groupToMap(function (n, i, testArr) { calls++; assert.sameValue(n, arr[i], "selected element aligns with index"); assert.sameValue(testArr, arr, "original array is passed as final argument"); diff --git a/test/built-ins/Array/prototype/groupToMap/emptyList.js b/test/built-ins/Array/prototype/groupToMap/emptyList.js index 892d5457e0..e5834ff4a2 100644 --- a/test/built-ins/Array/prototype/groupToMap/emptyList.js +++ b/test/built-ins/Array/prototype/groupToMap/emptyList.js @@ -20,7 +20,7 @@ features: [array-grouping] const original = []; -const map = original.groupToMap(() => { +const map = original.groupToMap(function () { throw new Test262Error('callback function should not be called') }); diff --git a/test/built-ins/Array/prototype/groupToMap/evenOdd.js b/test/built-ins/Array/prototype/groupToMap/evenOdd.js index 2bc4d15470..1c675de51d 100644 --- a/test/built-ins/Array/prototype/groupToMap/evenOdd.js +++ b/test/built-ins/Array/prototype/groupToMap/evenOdd.js @@ -16,12 +16,12 @@ info: | ... includes: [compareArray.js] -features: [array-grouping] +features: [array-grouping, Map, Symbol.iterator] ---*/ const array = [1, 2, 3]; -const map = array.groupToMap(i => { +const map = array.groupToMap(function (i) { return i % 2 === 0 ? 'even' : 'odd'; }); diff --git a/test/built-ins/Array/prototype/groupToMap/groupLength.js b/test/built-ins/Array/prototype/groupToMap/groupLength.js index 7afc948e1b..b06d5f0d67 100644 --- a/test/built-ins/Array/prototype/groupToMap/groupLength.js +++ b/test/built-ins/Array/prototype/groupToMap/groupLength.js @@ -16,12 +16,12 @@ info: | ... includes: [compareArray.js] -features: [array-grouping] +features: [array-grouping, Map, Symbol.iterator] ---*/ const arr = ['hello', 'test', 'world']; -const map = arr.groupToMap(i => i.length); +const map = arr.groupToMap(function (i) { return i.length; }); assert.compareArray(Array.from(map.keys()), [5, 4]); assert.compareArray(map.get(5), ['hello', 'world']); diff --git a/test/built-ins/Array/prototype/groupToMap/invalid-property-key.js b/test/built-ins/Array/prototype/groupToMap/invalid-property-key.js index 8e5a805068..990eea14f8 100644 --- a/test/built-ins/Array/prototype/groupToMap/invalid-property-key.js +++ b/test/built-ins/Array/prototype/groupToMap/invalid-property-key.js @@ -14,7 +14,7 @@ info: | ... includes: [compareArray.js] -features: [array-grouping] +features: [array-grouping, Map, Symbol.iterator] ---*/ const key = { diff --git a/test/built-ins/Array/prototype/groupToMap/map-instance.js b/test/built-ins/Array/prototype/groupToMap/map-instance.js index 433bba2ca3..bd5c6987f7 100644 --- a/test/built-ins/Array/prototype/groupToMap/map-instance.js +++ b/test/built-ins/Array/prototype/groupToMap/map-instance.js @@ -14,12 +14,12 @@ info: | 9. Return map. ... -features: [array-grouping] +features: [array-grouping, Map] ---*/ const array = [1, 2, 3]; -const map = array.groupToMap(i => { +const map = array.groupToMap(function (i) { return i % 2 === 0 ? 'even' : 'odd'; }); diff --git a/test/built-ins/Array/prototype/groupToMap/negativeZero.js b/test/built-ins/Array/prototype/groupToMap/negativeZero.js index 9a4a6c6e64..7e6cc0acb9 100644 --- a/test/built-ins/Array/prototype/groupToMap/negativeZero.js +++ b/test/built-ins/Array/prototype/groupToMap/negativeZero.js @@ -13,13 +13,13 @@ info: | ... includes: [compareArray.js] -features: [array-grouping] +features: [array-grouping, Map] ---*/ const arr = [-0, +0]; -const map = arr.groupToMap(i => i); +const map = arr.groupToMap(function (i) { return i; }); assert.sameValue(map.size, 1); assert.compareArray(map.get(0), [-0, 0]); diff --git a/test/built-ins/Array/prototype/groupToMap/sparse-array.js b/test/built-ins/Array/prototype/groupToMap/sparse-array.js index e6af691f65..801fc5f2ce 100644 --- a/test/built-ins/Array/prototype/groupToMap/sparse-array.js +++ b/test/built-ins/Array/prototype/groupToMap/sparse-array.js @@ -17,13 +17,13 @@ info: | ... includes: [compareArray.js] -features: [array-grouping] +features: [array-grouping, Map] ---*/ let calls = 0; const array = [, , ,]; -const map = array.groupToMap(() => { +const map = array.groupToMap(function () { calls++; return 'key'; }); diff --git a/test/built-ins/Array/prototype/groupToMap/this-arg-strict.js b/test/built-ins/Array/prototype/groupToMap/this-arg-strict.js index 1125d6719a..7d3ec3c1cd 100644 --- a/test/built-ins/Array/prototype/groupToMap/this-arg-strict.js +++ b/test/built-ins/Array/prototype/groupToMap/this-arg-strict.js @@ -14,7 +14,7 @@ info: | ... flags: [onlyStrict] -features: [array-grouping] +features: [array-grouping, Map] ---*/ diff --git a/test/built-ins/Array/prototype/groupToMap/this-arg.js b/test/built-ins/Array/prototype/groupToMap/this-arg.js index 0dc3174960..dbe05972e3 100644 --- a/test/built-ins/Array/prototype/groupToMap/this-arg.js +++ b/test/built-ins/Array/prototype/groupToMap/this-arg.js @@ -14,7 +14,7 @@ info: | ... flags: [noStrict] -features: [array-grouping] +features: [array-grouping, Map] ---*/