Skip to content
Browse files

added another test case

  • Loading branch information...
1 parent e089c19 commit 4ac5515350fbf920599c732cb9b4bd216ce443b8 @coolaj86 committed Nov 5, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/array-wtf.js
View
14 tests/array-wtf.js
@@ -40,6 +40,20 @@
console.log(typeOf(c));
// Expected: array
// Node/V8/FF: object
+
+
+ d = Object.create(Array);
+ // FF: Error: typeof prototype[function] != 'object'
+ d[2] = 27;
+ console.log(d);
+ // Expected: [undefined, undefined, 27];
+ // Node/V8: { '2': 27 }
+ console.log(d.length);
+ // Expected: 3
+ // Node/V8/FF: 1
+ console.log(typeOf(d));
+ // Expected: array
+ // Node/V8: object
}());
/*

0 comments on commit 4ac5515

Please sign in to comment.
Something went wrong with that request. Please try again.