-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray_test.js
More file actions
32 lines (25 loc) · 859 Bytes
/
Copy patharray_test.js
File metadata and controls
32 lines (25 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*jslint indent: 2*/
/*globals TestCase, assertEquals, assertNotEquals */
TestCase("arrayTest", {
setUp: function () {
this.array = new Array();
},
tearDown: function () {
delete this.array;
},
"test new array should equal literal": function () {
assertEquals([], this.array);
},
"test new array should equal 0" : function () {
assertEquals(0, this.array);
},
"test new array should not equal array with inital capacity" : function () {
assertNotEquals(new Array(10), this.array);
},
"test new array should be of type object" : function () {
assertEquals("object", typeof this.array);
},
"test prototype.toString of new array should be [object Array]" : function () {
assertEquals("[object Array]", Object.prototype.toString.apply(this.array));
}
});