@@ -351,68 +351,4 @@ describe('SentrySpan', () => {
351
351
} ) ;
352
352
} ) ;
353
353
} ) ;
354
-
355
- // Ensure that attributes & data are merged together
356
- describe ( '_getData' , ( ) => {
357
- it ( 'works without data & attributes' , ( ) => {
358
- const span = new SentrySpan ( ) ;
359
-
360
- expect ( span [ '_getData' ] ( ) ) . toEqual ( {
361
- // origin is set by default to 'manual' in the SentrySpan constructor
362
- 'sentry.origin' : 'manual' ,
363
- } ) ;
364
- } ) ;
365
-
366
- it ( 'works with data only' , ( ) => {
367
- const span = new SentrySpan ( ) ;
368
- // eslint-disable-next-line deprecation/deprecation
369
- span . setData ( 'foo' , 'bar' ) ;
370
-
371
- expect ( span [ '_getData' ] ( ) ) . toEqual ( {
372
- foo : 'bar' ,
373
- // origin is set by default to 'manual' in the SentrySpan constructor
374
- 'sentry.origin' : 'manual' ,
375
- } ) ;
376
- expect ( span [ '_getData' ] ( ) ) . toStrictEqual ( {
377
- // eslint-disable-next-line deprecation/deprecation
378
- ...span . data ,
379
- 'sentry.origin' : 'manual' ,
380
- } ) ;
381
- } ) ;
382
-
383
- it ( 'works with attributes only' , ( ) => {
384
- const span = new SentrySpan ( ) ;
385
- span . setAttribute ( 'foo' , 'bar' ) ;
386
-
387
- expect ( span [ '_getData' ] ( ) ) . toEqual ( {
388
- foo : 'bar' ,
389
- // origin is set by default to 'manual' in the SentrySpan constructor
390
- 'sentry.origin' : 'manual' ,
391
- } ) ;
392
- // eslint-disable-next-line deprecation/deprecation
393
- expect ( span [ '_getData' ] ( ) ) . toBe ( span . attributes ) ;
394
- } ) ;
395
-
396
- it ( 'merges data & attributes' , ( ) => {
397
- const span = new SentrySpan ( ) ;
398
- span . setAttribute ( 'foo' , 'foo' ) ;
399
- span . setAttribute ( 'bar' , 'bar' ) ;
400
- // eslint-disable-next-line deprecation/deprecation
401
- span . setData ( 'foo' , 'foo2' ) ;
402
- // eslint-disable-next-line deprecation/deprecation
403
- span . setData ( 'baz' , 'baz' ) ;
404
-
405
- expect ( span [ '_getData' ] ( ) ) . toEqual ( {
406
- foo : 'foo' ,
407
- bar : 'bar' ,
408
- baz : 'baz' ,
409
- // origin is set by default to 'manual' in the SentrySpan constructor
410
- 'sentry.origin' : 'manual' ,
411
- } ) ;
412
- // eslint-disable-next-line deprecation/deprecation
413
- expect ( span [ '_getData' ] ( ) ) . not . toBe ( span . attributes ) ;
414
- // eslint-disable-next-line deprecation/deprecation
415
- expect ( span [ '_getData' ] ( ) ) . not . toBe ( span . data ) ;
416
- } ) ;
417
- } ) ;
418
354
} ) ;
0 commit comments