summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js')
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js37
1 files changed, 20 insertions, 17 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js
index 604a91c14..8b63d3e3e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-11.js
@@ -9,26 +9,29 @@ description: >
any side-effects that might be produced by step 3
---*/
- function callbackfn(prevVal, curVal, idx, obj) {
- return (curVal > 10);
- }
+function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal > 10);
+}
- var obj = { 0: 11, 1: 12 };
+var obj = {
+ 0: 11,
+ 1: 12
+};
- var accessed = false;
+var accessed = false;
- Object.defineProperty(obj, "length", {
- get: function () {
- return {
- toString: function () {
- accessed = true;
- return "0";
- }
- };
- },
- configurable: true
- });
+Object.defineProperty(obj, "length", {
+ get: function() {
+ return {
+ toString: function() {
+ accessed = true;
+ return "0";
+ }
+ };
+ },
+ configurable: true
+});
assert.throws(TypeError, function() {
- Array.prototype.reduce.call(obj, callbackfn);
+ Array.prototype.reduce.call(obj, callbackfn);
});
assert(accessed, 'accessed !== true');