diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js index cea6793e0..76d34aed0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-6.js @@ -10,14 +10,19 @@ description: > initVal ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} assert.throws(TypeError, function() { - f.reduceRight(cb); + f.reduceRight(cb); }); |