@@ -239,47 +239,6 @@ describe('_addMeasureSpans', () => {
239239 expect ( spanData [ 'sentry.browser.measure.detail.callback' ] ) . toBe ( JSON . stringify ( detail . callback ) ) ;
240240 } ) ;
241241
242- it ( 'handles errors in detail processing gracefully' , ( ) => {
243- const spans : Span [ ] = [ ] ;
244-
245- getClient ( ) ?. on ( 'spanEnd' , span => {
246- spans . push ( span ) ;
247- } ) ;
248-
249- // Create an entry with a detail that will cause an error when processed
250- const entry = {
251- entryType : 'measure' ,
252- name : 'measure-1' ,
253- duration : 10 ,
254- startTime : 12 ,
255- get detail ( ) {
256- throw new Error ( 'Test error' ) ;
257- } ,
258- } as PerformanceMeasure ;
259-
260- const timeOrigin = 100 ;
261- const startTime = 23 ;
262- const duration = 356 ;
263-
264- // Should not throw
265- _addMeasureSpans ( span , entry , startTime , duration , timeOrigin ) ;
266-
267- expect ( spans ) . toHaveLength ( 1 ) ;
268- expect ( spanToJSON ( spans [ 0 ] ! ) ) . toEqual (
269- expect . objectContaining ( {
270- description : 'measure-1' ,
271- start_timestamp : timeOrigin + startTime ,
272- timestamp : timeOrigin + startTime + duration ,
273- op : 'measure' ,
274- origin : 'auto.resource.browser.metrics' ,
275- data : {
276- [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'measure' ,
277- [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.resource.browser.metrics' ,
278- } ,
279- } ) ,
280- ) ;
281- } ) ;
282-
283242 it ( 'handles errors in object detail value stringification' , ( ) => {
284243 const spans : Span [ ] = [ ] ;
285244
0 commit comments