@@ -150,9 +150,9 @@ describe('platform_browser/popup_redirect', () => {
150
150
await resolver . _openPopup ( auth , provider , event ) ;
151
151
152
152
const matches = ( popupUrl as string ) . match ( / .* ?# ( .* ) / ) ;
153
- expect ( matches ) . not . to . be . null ;
154
- const fragment = matches ! [ 1 ] ;
155
- expect ( fragment ) . to . be . empty ;
153
+ // The '#' character will not be included when the url fragment is not attached,
154
+ // so the url will not match the pattern
155
+ expect ( matches ) . to . be . null ;
156
156
} ) ;
157
157
158
158
it ( 'does not add the App Check token in the url fragment if controller unavailable' , async ( ) => {
@@ -164,9 +164,9 @@ describe('platform_browser/popup_redirect', () => {
164
164
await resolver . _openPopup ( auth , provider , event ) ;
165
165
166
166
const matches = ( popupUrl as string ) . match ( / .* ?# ( .* ) / ) ;
167
- expect ( matches ) . not . to . be . null ;
168
- const fragment = matches ! [ 1 ] ;
169
- expect ( fragment ) . to . be . empty ;
167
+ // The '#' character will not be included when the url fragment is not attached,
168
+ // so the url will not match the pattern
169
+ expect ( matches ) . to . be . null ;
170
170
} ) ;
171
171
172
172
it ( 'throws an error if apiKey is unspecified' , async ( ) => {
@@ -259,9 +259,9 @@ describe('platform_browser/popup_redirect', () => {
259
259
} ) ;
260
260
261
261
const matches = newWindowLocation . match ( / .* ?# ( .* ) / ) ;
262
- expect ( matches ) . not . to . be . null ;
263
- const fragment = matches ! [ 1 ] ;
264
- expect ( fragment ) . to . be . empty ;
262
+ // The '#' character will not be included when the url fragment is not attached,
263
+ // so the url will not match the pattern
264
+ expect ( matches ) . to . be . null ;
265
265
} ) ;
266
266
267
267
it ( 'does not add the App Check token in the url fragment if controller unavailable' , async ( ) => {
@@ -279,9 +279,9 @@ describe('platform_browser/popup_redirect', () => {
279
279
} ) ;
280
280
281
281
const matches = newWindowLocation . match ( / .* ?# ( .* ) / ) ;
282
- expect ( matches ) . not . to . be . null ;
283
- const fragment = matches ! [ 1 ] ;
284
- expect ( fragment ) . to . be . empty ;
282
+ // The '#' character will not be included when the url fragment is not attached,
283
+ // so the url will not match the pattern
284
+ expect ( matches ) . to . be . null ;
285
285
} ) ;
286
286
287
287
it ( 'throws an error if authDomain is unspecified' , async ( ) => {
0 commit comments