@@ -80,6 +80,7 @@ describe('withProfiler', () => {
8080 description : `<${ UNKNOWN_COMPONENT } >` ,
8181 op : REACT_MOUNT_OP ,
8282 origin : 'auto.ui.react.profiler' ,
83+ data : { 'ui.component_name' : 'unknown' } ,
8384 } ) ;
8485 } ) ;
8586 } ) ;
@@ -99,6 +100,7 @@ describe('withProfiler', () => {
99100 op : REACT_RENDER_OP ,
100101 origin : 'auto.ui.react.profiler' ,
101102 startTimestamp : undefined ,
103+ data : { 'ui.component_name' : 'unknown' } ,
102104 } ) ;
103105 } ) ;
104106
@@ -114,7 +116,6 @@ describe('withProfiler', () => {
114116 expect ( mockStartChild ) . toHaveBeenCalledTimes ( 1 ) ;
115117 } ) ;
116118 } ) ;
117-
118119 describe ( 'update span' , ( ) => {
119120 it ( 'is created when component is updated' , ( ) => {
120121 const ProfiledComponent = withProfiler ( ( props : { num : number } ) => < div > { props . num } </ div > ) ;
@@ -126,7 +127,7 @@ describe('withProfiler', () => {
126127 rerender ( < ProfiledComponent num = { 1 } /> ) ;
127128 expect ( mockStartChild ) . toHaveBeenCalledTimes ( 2 ) ;
128129 expect ( mockStartChild ) . toHaveBeenLastCalledWith ( {
129- data : { changedProps : [ 'num' ] } ,
130+ data : { changedProps : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
130131 description : `<${ UNKNOWN_COMPONENT } >` ,
131132 op : REACT_UPDATE_OP ,
132133 origin : 'auto.ui.react.profiler' ,
@@ -137,7 +138,7 @@ describe('withProfiler', () => {
137138 rerender ( < ProfiledComponent num = { 2 } /> ) ;
138139 expect ( mockStartChild ) . toHaveBeenCalledTimes ( 3 ) ;
139140 expect ( mockStartChild ) . toHaveBeenLastCalledWith ( {
140- data : { changedProps : [ 'num' ] } ,
141+ data : { changedProps : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
141142 description : `<${ UNKNOWN_COMPONENT } >` ,
142143 op : REACT_UPDATE_OP ,
143144 origin : 'auto.ui.react.profiler' ,
@@ -180,6 +181,7 @@ describe('useProfiler()', () => {
180181 description : '<Example>' ,
181182 op : REACT_MOUNT_OP ,
182183 origin : 'auto.ui.react.profiler' ,
184+ data : { 'ui.component_name' : 'Example' } ,
183185 } ) ;
184186 } ) ;
185187 } ) ;
@@ -203,6 +205,7 @@ describe('useProfiler()', () => {
203205 description : '<Example>' ,
204206 op : REACT_RENDER_OP ,
205207 origin : 'auto.ui.react.profiler' ,
208+ data : { 'ui.component_name' : 'Example' } ,
206209 } ) ,
207210 ) ;
208211 } ) ;
0 commit comments