|
9 | 9 | spanToJSON, |
10 | 10 | withScope, |
11 | 11 | } from '../../../src'; |
12 | | -import { Scope } from '../../../src/scope'; |
13 | 12 | import { |
14 | 13 | Span, |
15 | 14 | continueTrace, |
@@ -304,7 +303,7 @@ describe('startSpan', () => { |
304 | 303 | it('allows to pass a scope', () => { |
305 | 304 | const initialScope = getCurrentScope(); |
306 | 305 |
|
307 | | - const manualScope = new Scope(); |
| 306 | + const manualScope = initialScope.clone(); |
308 | 307 | const parentSpan = new Span({ spanId: 'parent-span-id' }); |
309 | 308 | // eslint-disable-next-line deprecation/deprecation |
310 | 309 | manualScope.setSpan(parentSpan); |
@@ -463,7 +462,7 @@ describe('startSpanManual', () => { |
463 | 462 | it('allows to pass a scope', () => { |
464 | 463 | const initialScope = getCurrentScope(); |
465 | 464 |
|
466 | | - const manualScope = new Scope(); |
| 465 | + const manualScope = initialScope.clone(); |
467 | 466 | const parentSpan = new Span({ spanId: 'parent-span-id' }); |
468 | 467 | // eslint-disable-next-line deprecation/deprecation |
469 | 468 | manualScope.setSpan(parentSpan); |
@@ -568,7 +567,9 @@ describe('startInactiveSpan', () => { |
568 | 567 | }); |
569 | 568 |
|
570 | 569 | it('allows to pass a scope', () => { |
571 | | - const manualScope = new Scope(); |
| 570 | + const initialScope = getCurrentScope(); |
| 571 | + |
| 572 | + const manualScope = initialScope.clone(); |
572 | 573 | const parentSpan = new Span({ spanId: 'parent-span-id' }); |
573 | 574 | // eslint-disable-next-line deprecation/deprecation |
574 | 575 | manualScope.setSpan(parentSpan); |
|
0 commit comments