@@ -2142,8 +2142,8 @@ describe('Client', () => {
21422142 expect ( recordLostEventSpy ) . toHaveBeenCalledWith ( 'event_processor' , 'error' ) ;
21432143 } ) ;
21442144
2145- test ( 'event processor records dropped transaction events' , ( ) => {
2146- expect . assertions ( 1 ) ;
2145+ test ( 'event processor records dropped transaction events and spans ' , ( ) => {
2146+ expect . assertions ( 3 ) ;
21472147
21482148 const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN } ) ;
21492149 const client = new TestClient ( options ) ;
@@ -2153,9 +2153,28 @@ describe('Client', () => {
21532153 const scope = new Scope ( ) ;
21542154 scope . addEventProcessor ( ( ) => null ) ;
21552155
2156- client . captureEvent ( { transaction : '/dogs/are/great' , type : 'transaction' } , { } , scope ) ;
2156+ client . captureEvent (
2157+ {
2158+ transaction : '/dogs/are/great' ,
2159+ type : 'transaction' ,
2160+ spans : [
2161+ {
2162+ description : 'fetch dogs' ,
2163+ data : { } ,
2164+ status : 'ok' ,
2165+ span_id : '9e15bf99fbe4bc80' ,
2166+ start_timestamp : 1591603196.637835 ,
2167+ trace_id : '86f39e84263a4de99c326acab3bfe3bd' ,
2168+ } ,
2169+ ] ,
2170+ } ,
2171+ { } ,
2172+ scope ,
2173+ ) ;
21572174
2175+ expect ( recordLostEventSpy ) . toHaveBeenCalledTimes ( 2 ) ;
21582176 expect ( recordLostEventSpy ) . toHaveBeenCalledWith ( 'event_processor' , 'transaction' ) ;
2177+ expect ( recordLostEventSpy ) . toHaveBeenCalledWith ( 'event_processor' , 'span' , 2 ) ;
21592178 } ) ;
21602179
21612180 test ( 'mutating transaction name with event processors sets transaction-name-change metadata' , ( ) => {
0 commit comments