diff options
Diffstat (limited to 'test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js')
-rw-r--r-- | test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js index 97dfb262b..68d53c92c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-7.js @@ -9,18 +9,23 @@ description: > callbackfn terminate iteration ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (called === 1) { - throw new Error("Exception occurred in callbackfn"); - } - return true; - } +function callbackfn(val, idx, obj) { + called++; + if (called === 1) { + throw new Error("Exception occurred in callbackfn"); + } + return true; +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Error, function() { - Array.prototype.filter.call(obj, callbackfn); + Array.prototype.filter.call(obj, callbackfn); }); assert.sameValue(called, 1, 'called'); |