@@ -125,11 +125,11 @@ test('should inject `sentry-trace` and `baggage` into root loader throwing a red
125
125
} ) => {
126
126
await page . goto ( '/?type=throwRedirect' ) ;
127
127
128
+ const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
129
+
128
130
// We should be successfully redirected to the path.
129
131
expect ( page . url ( ) ) . toEqual ( expect . stringContaining ( '/?type=plain' ) ) ;
130
132
131
- const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
132
-
133
133
expect ( sentryTrace ) . toMatch ( / .+ / ) ;
134
134
expect ( sentryBaggage ) . toMatch ( / .+ / ) ;
135
135
@@ -146,11 +146,11 @@ test('should inject `sentry-trace` and `baggage` into root loader returning a re
146
146
} ) => {
147
147
await page . goto ( '/?type=returnRedirect' ) ;
148
148
149
+ const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
150
+
149
151
// We should be successfully redirected to the path.
150
152
expect ( page . url ( ) ) . toEqual ( expect . stringContaining ( '/?type=plain' ) ) ;
151
153
152
- const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
153
-
154
154
expect ( sentryTrace ) . toMatch ( / .+ / ) ;
155
155
expect ( sentryBaggage ) . toMatch ( / .+ / ) ;
156
156
@@ -165,23 +165,23 @@ test('should inject `sentry-trace` and `baggage` into root loader returning a re
165
165
test ( 'should return redirect to an external path with no baggage and trace injected.' , async ( { page } ) => {
166
166
await page . goto ( '/?type=returnRedirectToExternal' ) ;
167
167
168
+ const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
169
+
168
170
// We should be successfully redirected to the external path.
169
171
expect ( page . url ( ) ) . toEqual ( expect . stringContaining ( 'https://example.com' ) ) ;
170
172
171
- const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
172
-
173
173
expect ( sentryTrace ) . toBeUndefined ( ) ;
174
174
expect ( sentryBaggage ) . toBeUndefined ( ) ;
175
175
} ) ;
176
176
177
177
test ( 'should throw redirect to an external path with no baggage and trace injected.' , async ( { page } ) => {
178
178
await page . goto ( '/?type=throwRedirectToExternal' ) ;
179
179
180
+ const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
181
+
180
182
// We should be successfully redirected to the external path.
181
183
expect ( page . url ( ) ) . toEqual ( expect . stringContaining ( 'https://example.com' ) ) ;
182
184
183
- const { sentryTrace, sentryBaggage } = await extractTraceAndBaggageFromMeta ( page ) ;
184
-
185
185
expect ( sentryTrace ) . toBeUndefined ( ) ;
186
186
expect ( sentryBaggage ) . toBeUndefined ( ) ;
187
187
} ) ;
0 commit comments