@@ -17,8 +17,8 @@ describe('Dsn', () => {
17
17
expect ( dsn . pass ) . toBe ( 'xyz' ) ;
18
18
expect ( dsn . host ) . toBe ( 'sentry.io' ) ;
19
19
expect ( dsn . port ) . toBe ( '1234' ) ;
20
- expect ( dsn . path ) . toBe ( '' ) ;
21
20
expect ( dsn . projectId ) . toBe ( '123' ) ;
21
+ expect ( dsn . path ) . toBe ( '' ) ;
22
22
} ) ;
23
23
24
24
test ( 'applies partial components' , ( ) => {
@@ -33,8 +33,8 @@ describe('Dsn', () => {
33
33
expect ( dsn . pass ) . toBe ( '' ) ;
34
34
expect ( dsn . host ) . toBe ( 'sentry.io' ) ;
35
35
expect ( dsn . port ) . toBe ( '' ) ;
36
- expect ( dsn . path ) . toBe ( '' ) ;
37
36
expect ( dsn . projectId ) . toBe ( '123' ) ;
37
+ expect ( dsn . path ) . toBe ( '' ) ;
38
38
} ) ;
39
39
40
40
test ( 'throws for missing components' , ( ) => {
@@ -107,8 +107,8 @@ describe('Dsn', () => {
107
107
expect ( dsn . pass ) . toBe ( 'xyz' ) ;
108
108
expect ( dsn . host ) . toBe ( 'sentry.io' ) ;
109
109
expect ( dsn . port ) . toBe ( '1234' ) ;
110
- expect ( dsn . path ) . toBe ( '' ) ;
111
110
expect ( dsn . projectId ) . toBe ( '123' ) ;
111
+ expect ( dsn . path ) . toBe ( '' ) ;
112
112
} ) ;
113
113
114
114
test ( 'parses a valid partial Dsn' , ( ) => {
@@ -133,17 +133,6 @@ describe('Dsn', () => {
133
133
expect ( dsn . projectId ) . toBe ( '321' ) ;
134
134
} ) ;
135
135
136
- test ( 'with a query string' , ( ) => {
137
- const dsn = new Dsn ( 'https://abc@sentry.io/321?sample.rate=0.1&other=value' ) ;
138
- expect ( dsn . protocol ) . toBe ( 'https' ) ;
139
- expect ( dsn . user ) . toBe ( 'abc' ) ;
140
- expect ( dsn . pass ) . toBe ( '' ) ;
141
- expect ( dsn . host ) . toBe ( 'sentry.io' ) ;
142
- expect ( dsn . port ) . toBe ( '' ) ;
143
- expect ( dsn . path ) . toBe ( '' ) ;
144
- expect ( dsn . projectId ) . toBe ( '321' ) ;
145
- } ) ;
146
-
147
136
test ( 'throws when provided invalid Dsn' , ( ) => {
148
137
expect ( ( ) => new Dsn ( 'some@random.dsn' ) ) . toThrow ( SentryError ) ;
149
138
} ) ;
@@ -158,7 +147,6 @@ describe('Dsn', () => {
158
147
test ( 'throws for invalid fields' , ( ) => {
159
148
expect ( ( ) => new Dsn ( 'httpx://abc@sentry.io/123' ) ) . toThrow ( SentryError ) ;
160
149
expect ( ( ) => new Dsn ( 'httpx://abc@sentry.io:xxx/123' ) ) . toThrow ( SentryError ) ;
161
- expect ( ( ) => new Dsn ( 'http://abc@sentry.io/abc' ) ) . toThrow ( SentryError ) ;
162
150
} ) ;
163
151
} ) ;
164
152
0 commit comments