1
1
import { getSentryCarrier } from '../../src/carrier' ;
2
- import { SDK_VERSION } from '../../src/utils-hoist/version ' ;
2
+ import { CARRIER_VERSION } from '../../src/carrier ' ;
3
3
4
4
describe ( 'getSentryCarrier' , ( ) => {
5
5
describe ( 'base case (one SDK)' , ( ) => {
@@ -11,17 +11,17 @@ describe('getSentryCarrier', () => {
11
11
12
12
expect ( globalObject ) . toEqual ( {
13
13
__SENTRY__ : {
14
- version : SDK_VERSION ,
15
- [ SDK_VERSION ] : { } ,
14
+ version : CARRIER_VERSION ,
15
+ [ CARRIER_VERSION ] : { } ,
16
16
} ,
17
17
} ) ;
18
18
} ) ;
19
19
20
20
it ( 'returns the existing sentry carrier object if it already exists' , ( ) => {
21
21
const originalGlobalObject = {
22
22
__SENTRY__ : {
23
- version : SDK_VERSION ,
24
- [ SDK_VERSION ] : {
23
+ version : CARRIER_VERSION ,
24
+ [ CARRIER_VERSION ] : {
25
25
acs : { } ,
26
26
} ,
27
27
} ,
@@ -42,13 +42,14 @@ describe('getSentryCarrier', () => {
42
42
describe ( 'multiple (older) SDKs' , ( ) => {
43
43
it ( "returns the version of the sentry carrier object of the SDK's version rather than the one set in .version" , ( ) => {
44
44
const sentryCarrier = getSentryCarrier ( {
45
- // @ts -expect-error - this is just a test object
46
45
__SENTRY__ : {
47
46
version : '8.0.0' , // another SDK set this
48
47
'8.0.0' : {
48
+ // @ts -expect-error - this is just a test object
49
49
stack : { } ,
50
50
} ,
51
- [ SDK_VERSION ] : {
51
+ [ CARRIER_VERSION ] : {
52
+ // @ts -expect-error - this is just a test object
52
53
acs : { } ,
53
54
} ,
54
55
hub : { } ,
@@ -82,7 +83,7 @@ describe('getSentryCarrier', () => {
82
83
'8.0.0' : {
83
84
acs : { } ,
84
85
} ,
85
- [ SDK_VERSION ] : { } ,
86
+ [ CARRIER_VERSION ] : { } ,
86
87
} ,
87
88
} ) ;
88
89
} ) ;
0 commit comments