@@ -353,14 +353,16 @@ describe('Integration | Scope', () => {
353
353
initialIsolationScope . setTag ( 'tag1' , 'val1' ) ;
354
354
initialIsolationScope . setTag ( 'tag2' , 'val2' ) ;
355
355
356
+ const initialCurrentScope = Sentry . getCurrentScope ( ) ;
357
+
356
358
const error = new Error ( 'test error' ) ;
357
359
358
- Sentry . withIsolationScope ( ( _currentScope , newIsolationScope ) => {
360
+ Sentry . withIsolationScope ( newIsolationScope => {
359
361
newIsolationScope . setTag ( 'tag4' , 'val4' ) ;
360
362
} ) ;
361
363
362
- Sentry . withIsolationScope ( ( currentScope , newIsolationScope ) => {
363
- expect ( Sentry . getCurrentScope ( ) ) . toBe ( currentScope ) ;
364
+ Sentry . withIsolationScope ( newIsolationScope => {
365
+ expect ( Sentry . getCurrentScope ( ) ) . not . toBe ( initialCurrentScope ) ;
364
366
expect ( Sentry . getIsolationScope ( ) ) . toBe ( newIsolationScope ) ;
365
367
expect ( newIsolationScope ) . not . toBe ( initialIsolationScope ) ;
366
368
@@ -402,13 +404,13 @@ describe('Integration | Scope', () => {
402
404
403
405
const error = new Error ( 'test error' ) ;
404
406
405
- Sentry . withIsolationScope ( ( _currentScope , newIsolationScope ) => {
407
+ Sentry . withIsolationScope ( newIsolationScope => {
406
408
newIsolationScope . setTag ( 'tag2' , 'val2' ) ;
407
409
408
- Sentry . withIsolationScope ( ( _currentScope , newIsolationScope ) => {
410
+ Sentry . withIsolationScope ( newIsolationScope => {
409
411
newIsolationScope . setTag ( 'tag3' , 'val3' ) ;
410
412
411
- Sentry . withIsolationScope ( ( _currentScope , newIsolationScope ) => {
413
+ Sentry . withIsolationScope ( newIsolationScope => {
412
414
newIsolationScope . setTag ( 'tag4' , 'val4' ) ;
413
415
} ) ;
414
416
@@ -648,8 +650,8 @@ describe('Integration | Scope', () => {
648
650
649
651
const error = new Error ( 'test error' ) ;
650
652
651
- Sentry . withIsolationScope ( ( currentScope , isolationScope ) => {
652
- currentScope . setTag ( 'tag2' , 'val2a' ) ;
653
+ Sentry . withIsolationScope ( isolationScope => {
654
+ Sentry . getCurrentScope ( ) . setTag ( 'tag2' , 'val2a' ) ;
653
655
isolationScope . setTag ( 'tag2' , 'val2b' ) ;
654
656
isolationScope . setTag ( 'tag3' , 'val3' ) ;
655
657
0 commit comments