@@ -72,7 +72,7 @@ describe('Sentry.trackComponent()', () => {
7272
7373 expect ( testInitSpan . end ) . toHaveBeenCalledTimes ( 1 ) ;
7474 expect ( testUpdateSpan . end ) . toHaveBeenCalledTimes ( 1 ) ;
75- expect ( testTransaction . spans . length ) . toEqual ( 1 ) ;
75+ expect ( testTransaction . spans . length ) . toEqual ( 2 ) ;
7676 } ) ;
7777
7878 it ( 'creates an update span, when the component is updated' , async ( ) => {
@@ -90,13 +90,13 @@ describe('Sentry.trackComponent()', () => {
9090 await act ( ( ) => component . $set ( { options : { trackUpdates : true } } ) ) ;
9191
9292 // once for init (unimportant here), once for starting the update span
93- expect ( testTransaction . startChild ) . toHaveBeenCalledTimes ( 1 ) ;
93+ expect ( testTransaction . startChild ) . toHaveBeenCalledTimes ( 2 ) ;
9494 expect ( testTransaction . startChild ) . toHaveBeenLastCalledWith ( {
9595 description : '<Dummy$>' ,
96- op : 'ui.svelte.init ' ,
96+ op : 'ui.svelte.update ' ,
9797 origin : 'auto.ui.svelte' ,
9898 } ) ;
99- expect ( testTransaction . spans . length ) . toEqual ( 1 ) ;
99+ expect ( testTransaction . spans . length ) . toEqual ( 3 ) ;
100100 } ) ;
101101
102102 it ( 'only creates init spans if trackUpdates is deactivated' , ( ) => {
@@ -110,7 +110,7 @@ describe('Sentry.trackComponent()', () => {
110110
111111 expect ( testInitSpan . startChild ) . not . toHaveBeenCalled ( ) ;
112112
113- expect ( testInitSpan . end ) . toHaveBeenCalledTimes ( 0 ) ;
113+ expect ( testInitSpan . end ) . toHaveBeenCalledTimes ( 1 ) ;
114114 expect ( testTransaction . spans . length ) . toEqual ( 1 ) ;
115115 } ) ;
116116
@@ -156,7 +156,7 @@ describe('Sentry.trackComponent()', () => {
156156
157157 expect ( testInitSpan . end ) . toHaveBeenCalledTimes ( 1 ) ;
158158 expect ( testUpdateSpan . end ) . toHaveBeenCalledTimes ( 1 ) ;
159- expect ( testTransaction . spans . length ) . toEqual ( 1 ) ;
159+ expect ( testTransaction . spans . length ) . toEqual ( 2 ) ;
160160 } ) ;
161161
162162 it ( "doesn't do anything, if there's no ongoing transaction" , async ( ) => {
@@ -192,6 +192,6 @@ describe('Sentry.trackComponent()', () => {
192192 op : 'ui.svelte.init' ,
193193 origin : 'auto.ui.svelte' ,
194194 } ) ;
195- expect ( testTransaction . spans . length ) . toEqual ( 1 ) ;
195+ expect ( testTransaction . spans . length ) . toEqual ( 2 ) ;
196196 } ) ;
197197} ) ;
0 commit comments