summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/map/15.4.4.19-8-9.js')
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-8-9.js29
1 files changed, 14 insertions, 15 deletions
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js
index 5f47a3a63..397d7a9ff 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js
@@ -9,24 +9,23 @@ description: >
of iterations on an Array
---*/
-var called = 0;
+ var called = 0;
+ function callbackfn(val, idx, obj) {
+ called += 1;
+ return val > 10;
+ }
-function callbackfn(val, idx, obj) {
- called += 1;
- return val > 10;
-}
+ var arr = [9, , 12];
-var arr = [9, , 12];
+ Object.defineProperty(arr, "1", {
+ get: function () {
+ arr.length = 2;
+ return 8;
+ },
+ configurable: true
+ });
-Object.defineProperty(arr, "1", {
- get: function() {
- arr.length = 2;
- return 8;
- },
- configurable: true
-});
-
-var testResult = arr.map(callbackfn);
+ var testResult = arr.map(callbackfn);
assert.sameValue(testResult.length, 3, 'testResult.length');
assert.sameValue(called, 2, 'called');