@@ -31,7 +31,11 @@ import {
31
31
import { isNode } from '@firebase/util' ;
32
32
33
33
import { expect } from 'chai' ;
34
- import { browserLocalPersistence , browserSessionPersistence , inMemoryPersistence } from '../../../internal' ;
34
+ import {
35
+ browserLocalPersistence ,
36
+ browserSessionPersistence ,
37
+ inMemoryPersistence
38
+ } from '../../../internal' ;
35
39
36
40
import { AuthInternal } from '../../model/auth' ;
37
41
import {
@@ -128,7 +132,8 @@ describe('core/auth/initialize', () => {
128
132
}
129
133
}
130
134
131
- const fakePopupRedirectResolver : PopupRedirectResolver = FakePopupRedirectResolver ;
135
+ const fakePopupRedirectResolver : PopupRedirectResolver =
136
+ FakePopupRedirectResolver ;
132
137
133
138
before ( ( ) => {
134
139
registerAuth ( ClientPlatform . BROWSER ) ;
@@ -204,7 +209,7 @@ describe('core/auth/initialize', () => {
204
209
const auth = initializeAuth ( fakeApp , {
205
210
popupRedirectResolver : fakePopupRedirectResolver
206
211
} ) as AuthInternal ;
207
- await ( ( auth as unknown ) as _FirebaseService ) . _delete ( ) ;
212
+ await ( auth as unknown as _FirebaseService ) . _delete ( ) ;
208
213
await auth . _initializationPromise ;
209
214
210
215
expect ( auth . _isInitialized ) . to . be . false ;
@@ -221,38 +226,46 @@ describe('core/auth/initialize', () => {
221
226
persistence : browserSessionPersistence ,
222
227
popupRedirectResolver : fakePopupRedirectResolver
223
228
} ) ;
224
- expect ( initializeAuth ( fakeApp , {
225
- errorMap : prodErrorMap ,
226
- persistence : browserSessionPersistence ,
227
- popupRedirectResolver : fakePopupRedirectResolver
228
- } ) ) . to . equal ( auth ) ;
229
+ expect (
230
+ initializeAuth ( fakeApp , {
231
+ errorMap : prodErrorMap ,
232
+ persistence : browserSessionPersistence ,
233
+ popupRedirectResolver : fakePopupRedirectResolver
234
+ } )
235
+ ) . to . equal ( auth ) ;
229
236
} ) ;
230
237
231
238
it ( 'should throw if called again with different params (popupRedirectResolver)' , ( ) => {
232
239
initializeAuth ( fakeApp , {
233
240
popupRedirectResolver : fakePopupRedirectResolver
234
241
} ) ;
235
- expect ( ( ) => initializeAuth ( fakeApp , {
236
- popupRedirectResolver : undefined
237
- } ) ) . to . throw ( ) ;
242
+ expect ( ( ) =>
243
+ initializeAuth ( fakeApp , {
244
+ popupRedirectResolver : undefined
245
+ } )
246
+ ) . to . throw ( ) ;
238
247
} ) ;
239
248
240
249
it ( 'should throw if called again with different params (errorMap)' , ( ) => {
241
250
initializeAuth ( fakeApp , {
242
251
errorMap : prodErrorMap
243
252
} ) ;
244
- expect ( ( ) => initializeAuth ( fakeApp , {
245
- errorMap : debugErrorMap
246
- } ) ) . to . throw ( ) ;
253
+ expect ( ( ) =>
254
+ initializeAuth ( fakeApp , {
255
+ errorMap : debugErrorMap
256
+ } )
257
+ ) . to . throw ( ) ;
247
258
} ) ;
248
259
249
260
it ( 'should throw if called again with different params (persistence)' , ( ) => {
250
261
initializeAuth ( fakeApp , {
251
262
persistence : [ browserLocalPersistence , browserSessionPersistence ]
252
263
} ) ;
253
- expect ( ( ) => initializeAuth ( fakeApp , {
254
- persistence : [ browserSessionPersistence , browserLocalPersistence ]
255
- } ) ) . to . throw ( ) ;
264
+ expect ( ( ) =>
265
+ initializeAuth ( fakeApp , {
266
+ persistence : [ browserSessionPersistence , browserLocalPersistence ]
267
+ } )
268
+ ) . to . throw ( ) ;
256
269
} ) ;
257
270
} ) ;
258
271
} ) ;
0 commit comments