@@ -575,7 +575,7 @@ suite('JSON', () => {
575
575
} ) ;
576
576
577
577
test ( 'tree: find location' , ( ) => {
578
- let root = parseTree ( '{ "key1": { "key11": [ "val111", "val112" ] }, "key2": [ { "key21": false, "key22": 221 }, null, [{}] ] }' ) ;
578
+ let root = parseTree ( '{ "key1": { "key11": [ "val111", "val112" ] }, "key2": [ { "key21": false, "key22": 221 }, null, [{}] ], "key3": { "key31":, "key32": 32 } }' ) ;
579
579
assertNodeAtLocation ( root , [ 'key1' ] , { key11 : [ 'val111' , 'val112' ] } ) ;
580
580
assertNodeAtLocation ( root , [ 'key1' , 'key11' ] , [ 'val111' , 'val112' ] ) ;
581
581
assertNodeAtLocation ( root , [ 'key1' , 'key11' , 0 ] , 'val111' ) ;
@@ -586,6 +586,8 @@ suite('JSON', () => {
586
586
assertNodeAtLocation ( root , [ 'key2' , 1 ] , null ) ;
587
587
assertNodeAtLocation ( root , [ 'key2' , 2 ] , [ { } ] ) ;
588
588
assertNodeAtLocation ( root , [ 'key2' , 2 , 0 ] , { } ) ;
589
+ assertNodeAtLocation ( root , [ 'key3' , 'key31' , 'key311' ] , undefined ) ;
590
+ assertNodeAtLocation ( root , [ 'key3' , 'key32' ] , 32 ) ;
589
591
} ) ;
590
592
591
593
test ( 'location: matches' , ( ) => {
0 commit comments