|
1 | 1 | import { TRACEPARENT_REGEXP, timestampInSeconds } from '@sentry/utils'; |
2 | | -import { Span, Transaction, spanToTraceHeader } from '../../../src'; |
3 | | -import { getRootSpan, spanIsSampled, spanTimeInputToSeconds, spanToJSON } from '../../../src/utils/spanUtils'; |
| 2 | +import { Span, spanToTraceHeader } from '../../../src'; |
| 3 | +import { spanIsSampled, spanTimeInputToSeconds, spanToJSON } from '../../../src/utils/spanUtils'; |
4 | 4 |
|
5 | 5 | describe('spanToTraceHeader', () => { |
6 | 6 | test('simple', () => { |
@@ -127,38 +127,3 @@ describe('spanIsSampled', () => { |
127 | 127 | expect(spanIsSampled(span)).toBe(false); |
128 | 128 | }); |
129 | 129 | }); |
130 | | - |
131 | | -describe('getRootSpan', () => { |
132 | | - it('returns the root span of a span (Span)', () => { |
133 | | - const root = new Span({ name: 'test' }); |
134 | | - // @ts-expect-error this is highly illegal and shouldn't happen IRL |
135 | | - // eslint-disable-next-line deprecation/deprecation |
136 | | - root.transaction = root; |
137 | | - |
138 | | - // eslint-disable-next-line deprecation/deprecation |
139 | | - const childSpan = root.startChild({ name: 'child' }); |
140 | | - expect(getRootSpan(childSpan)).toBe(root); |
141 | | - }); |
142 | | - |
143 | | - it('returns the root span of a span (Transaction)', () => { |
144 | | - // eslint-disable-next-line deprecation/deprecation |
145 | | - const root = new Transaction({ name: 'test' }); |
146 | | - |
147 | | - // eslint-disable-next-line deprecation/deprecation |
148 | | - const childSpan = root.startChild({ name: 'child' }); |
149 | | - expect(getRootSpan(childSpan)).toBe(root); |
150 | | - }); |
151 | | - |
152 | | - it('returns the span itself if it is a root span', () => { |
153 | | - // eslint-disable-next-line deprecation/deprecation |
154 | | - const span = new Transaction({ name: 'test' }); |
155 | | - |
156 | | - expect(getRootSpan(span)).toBe(span); |
157 | | - }); |
158 | | - |
159 | | - it('returns undefined if span has no root span', () => { |
160 | | - const span = new Span({ name: 'test' }); |
161 | | - |
162 | | - expect(getRootSpan(span)).toBe(undefined); |
163 | | - }); |
164 | | -}); |
0 commit comments