summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js')
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
index cdfc98323..de7e415f3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
@@ -9,14 +9,18 @@ description: >
property on an Array-like object
---*/
- var kValue = {};
- function callbackfn(val, idx, obj) {
- return (idx === 5) && (val === kValue);
- }
+var kValue = {};
- var obj = { 5: kValue, length: 100 };
+function callbackfn(val, idx, obj) {
+ return (idx === 5) && (val === kValue);
+}
- var newArr = Array.prototype.filter.call(obj, callbackfn);
+var obj = {
+ 5: kValue,
+ length: 100
+};
+
+var newArr = Array.prototype.filter.call(obj, callbackfn);
assert.sameValue(newArr.length, 1, 'newArr.length');
assert.sameValue(newArr[0], kValue, 'newArr[0]');