@@ -80,6 +80,7 @@ describe('withProfiler', () => {
80
80
description : `<${ UNKNOWN_COMPONENT } >` ,
81
81
op : REACT_MOUNT_OP ,
82
82
origin : 'auto.ui.react.profiler' ,
83
+ data : { 'ui.component_name' : 'unknown' } ,
83
84
} ) ;
84
85
} ) ;
85
86
} ) ;
@@ -99,6 +100,7 @@ describe('withProfiler', () => {
99
100
op : REACT_RENDER_OP ,
100
101
origin : 'auto.ui.react.profiler' ,
101
102
startTimestamp : undefined ,
103
+ data : { 'ui.component_name' : 'unknown' } ,
102
104
} ) ;
103
105
} ) ;
104
106
@@ -114,7 +116,6 @@ describe('withProfiler', () => {
114
116
expect ( mockStartChild ) . toHaveBeenCalledTimes ( 1 ) ;
115
117
} ) ;
116
118
} ) ;
117
-
118
119
describe ( 'update span' , ( ) => {
119
120
it ( 'is created when component is updated' , ( ) => {
120
121
const ProfiledComponent = withProfiler ( ( props : { num : number } ) => < div > { props . num } </ div > ) ;
@@ -126,7 +127,7 @@ describe('withProfiler', () => {
126
127
rerender ( < ProfiledComponent num = { 1 } /> ) ;
127
128
expect ( mockStartChild ) . toHaveBeenCalledTimes ( 2 ) ;
128
129
expect ( mockStartChild ) . toHaveBeenLastCalledWith ( {
129
- data : { changedProps : [ 'num' ] } ,
130
+ data : { changedProps : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
130
131
description : `<${ UNKNOWN_COMPONENT } >` ,
131
132
op : REACT_UPDATE_OP ,
132
133
origin : 'auto.ui.react.profiler' ,
@@ -137,7 +138,7 @@ describe('withProfiler', () => {
137
138
rerender ( < ProfiledComponent num = { 2 } /> ) ;
138
139
expect ( mockStartChild ) . toHaveBeenCalledTimes ( 3 ) ;
139
140
expect ( mockStartChild ) . toHaveBeenLastCalledWith ( {
140
- data : { changedProps : [ 'num' ] } ,
141
+ data : { changedProps : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
141
142
description : `<${ UNKNOWN_COMPONENT } >` ,
142
143
op : REACT_UPDATE_OP ,
143
144
origin : 'auto.ui.react.profiler' ,
@@ -180,6 +181,7 @@ describe('useProfiler()', () => {
180
181
description : '<Example>' ,
181
182
op : REACT_MOUNT_OP ,
182
183
origin : 'auto.ui.react.profiler' ,
184
+ data : { 'ui.component_name' : 'Example' } ,
183
185
} ) ;
184
186
} ) ;
185
187
} ) ;
@@ -203,6 +205,7 @@ describe('useProfiler()', () => {
203
205
description : '<Example>' ,
204
206
op : REACT_RENDER_OP ,
205
207
origin : 'auto.ui.react.profiler' ,
208
+ data : { 'ui.component_name' : 'Example' } ,
206
209
} ) ,
207
210
) ;
208
211
} ) ;
0 commit comments