@@ -23,7 +23,7 @@ describe('getComponentsTree', () => {
2323 ) ;
2424 const target = container . querySelector ( '#outer-target' ) as HTMLElement ;
2525 expect ( getComponentsTree ( target ) ) . toEqual ( [
26- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
26+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
2727 ] ) ;
2828 } ) ;
2929 test ( 'only includes components inside the specified element' , ( ) => {
@@ -38,10 +38,10 @@ describe('getComponentsTree', () => {
3838 </ >
3939 ) ;
4040 expect ( getComponentsTree ( container . querySelector ( '#outer-target-1' ) as HTMLElement ) ) . toEqual ( [
41- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
41+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
4242 ] ) ;
4343 expect ( getComponentsTree ( container . querySelector ( '#outer-target-2' ) as HTMLElement ) ) . toEqual ( [
44- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
44+ { name : 'ComponentTwo' , label : 'sub label' } ,
4545 ] ) ;
4646 } ) ;
4747 test ( 'can include multiple components' , ( ) => {
@@ -55,11 +55,11 @@ describe('getComponentsTree', () => {
5555 {
5656 name : 'ComponentThree' ,
5757 children : [
58- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
59- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
58+ { name : 'ComponentTwo' , label : 'sub label' } ,
59+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
6060 ] ,
6161 } ,
62- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
62+ { name : 'ComponentTwo' , label : 'sub label' } ,
6363 ] ) ;
6464 } ) ;
6565 test ( 'can include multiple nested components' , ( ) => {
@@ -74,13 +74,13 @@ describe('getComponentsTree', () => {
7474 {
7575 name : 'ComponentThree' ,
7676 children : [
77- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
78- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
77+ { name : 'ComponentTwo' , label : 'sub label' } ,
78+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
7979 {
8080 name : 'ComponentThree' ,
8181 children : [
82- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
83- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
82+ { name : 'ComponentTwo' , label : 'sub label' } ,
83+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
8484 ] ,
8585 } ,
8686 ] ,
@@ -98,11 +98,11 @@ describe('getComponentsTree', () => {
9898 {
9999 name : 'ComponentThree' ,
100100 children : [
101- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
102- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
101+ { name : 'ComponentTwo' , label : 'sub label' } ,
102+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
103103 ] ,
104104 } ,
105- { name : 'ComponentTwo' , label : 'sub label' , children : [ ] } ,
105+ { name : 'ComponentTwo' , label : 'sub label' } ,
106106 ] ) ;
107107 } ) ;
108108 test ( 'skips malformed metadata' , ( ) => {
@@ -113,7 +113,7 @@ describe('getComponentsTree', () => {
113113 ) ;
114114 const target = container . querySelector ( '#outer-target' ) as HTMLElement ;
115115 expect ( getComponentsTree ( target ) ) . toEqual ( [
116- { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } , children : [ ] } ,
116+ { name : 'ComponentOne' , label : 'component label' , properties : { multi : 'true' } } ,
117117 ] ) ;
118118 } ) ;
119119 } ) ;
0 commit comments