diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js index 4adec3c10..bf0d29423 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-10.js @@ -10,28 +10,31 @@ description: > Object ---*/ - var accessed = false; - var testResult = true; +var accessed = false; +var testResult = true; - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } +function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } +} - var obj = { 2: 2, length: 20 }; +var obj = { + 2: 2, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + delete Object.prototype[3]; + return 0; + }, + configurable: true +}); - Object.prototype[3] = 1; - Array.prototype.reduce.call(obj, callbackfn); +Object.prototype[3] = 1; +Array.prototype.reduce.call(obj, callbackfn); assert(testResult, 'testResult !== true'); assert(accessed, 'accessed !== true'); |