File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,30 @@ describe('parent pointer array to tree', function() {
1414 } ) ;
1515
1616 it ( 'should not modify passed object' , function ( ) {
17- expect ( current ) . not . to . be . equal ( initial ) ;
17+ expect ( initial ) . to . be . deep . equal ( initial ) ;
18+ } ) ;
19+
20+ it ( 'should return an array' , function ( ) {
21+ expect ( current ) . to . be . an ( 'array' ) ;
22+ } ) ;
23+
24+ it ( 'should keep parent_id property' , function ( ) {
25+ var first = current [ 0 ] ;
26+
27+ expect ( first ) . to . have . property ( 'parent_id' ) ;
28+ } ) ;
29+
30+ it ( 'should create nested objects with children' , function ( ) {
31+ var first = current [ 0 ] ;
32+
33+ expect ( first )
34+ . to . have . property ( 'children' )
35+ . that . is . an ( 'array' )
36+ . to . have . length . of . at . least ( 1 ) ;
37+ } ) ;
38+
39+ it ( 'should return an expected value' , function ( ) {
40+ expect ( current ) . to . be . deep . equal ( expected ) ;
1841 } ) ;
1942
2043 } )
You can’t perform that action at this time.
0 commit comments