diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js index 8f8382931..2f72b891a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js @@ -9,27 +9,30 @@ description: > here ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } +} - var obj = { 2: "2", 3: 10 }; +var obj = { + 2: "2", + 3: 10 +}; - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + delete obj[2]; + return 5; + }, + configurable: true +}); - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); +Array.prototype.reduce.call(obj, callbackfn, "initialValue"); assert(accessed, 'accessed !== true'); assert(testResult, 'testResult !== true'); |