summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js')
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js31
1 files changed, 18 insertions, 13 deletions
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js
index 18e21b40e..7b914a1ee 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-12.js
@@ -10,21 +10,26 @@ description: >
Array-like object
---*/
- function callbackfn(val, idx, obj) {
- return true;
- }
- var obj = { 0: 0, 1: 111, 2: 2, length: 10 };
+function callbackfn(val, idx, obj) {
+ return true;
+}
+var obj = {
+ 0: 0,
+ 1: 111,
+ 2: 2,
+ length: 10
+};
- Object.defineProperty(obj, "0", {
- get: function () {
- delete obj[1];
- return 0;
- },
- configurable: true
- });
+Object.defineProperty(obj, "0", {
+ get: function() {
+ delete obj[1];
+ return 0;
+ },
+ configurable: true
+});
- Object.prototype[1] = 1;
- var newArr = Array.prototype.filter.call(obj, callbackfn);
+Object.prototype[1] = 1;
+var newArr = Array.prototype.filter.call(obj, callbackfn);
assert.sameValue(newArr.length, 3, 'newArr.length');
assert.sameValue(newArr[1], 1, 'newArr[1]');