@@ -28,6 +28,7 @@ import {
2828 FAKE_APP_CHECK_CONTROLLER_PROVIDER ,
2929 FAKE_HEARTBEAT_CONTROLLER ,
3030 FAKE_HEARTBEAT_CONTROLLER_PROVIDER ,
31+ regionalTestAuth ,
3132 testAuth ,
3233 testUser
3334} from '../../../test/helpers/mock_auth' ;
@@ -308,16 +309,17 @@ describe('core/auth/auth_impl', () => {
308309 expect ( persistenceStub . _remove ) . to . have . been . called ;
309310 expect ( auth . currentUser ) . to . be . null ;
310311 } ) ;
311- // it('sets currentUser to null, calls remove', async () => {
312- // const token: FirebaseToken = {
313- // token: 'test-token',
314- // expirationTime: 123456789
315- // };
316- // await auth._updateFirebaseToken(token);
317- // await auth.signOut();
318- // expect(persistenceStub._remove).to.have.been.called;
319- // expect(auth.firebaseToken).to.be.null;
320- // });
312+ it ( 'sets currentUser to null, calls remove' , async ( ) => {
313+ const regionalAuth = await regionalTestAuth ( ) ;
314+ const token : FirebaseToken = {
315+ token : 'test-token' ,
316+ expirationTime : 123456789
317+ } ;
318+ await regionalAuth . _updateFirebaseToken ( token ) ;
319+ await regionalAuth . signOut ( ) ;
320+ expect ( persistenceStub . _remove ) . to . have . been . called ;
321+ expect ( regionalAuth . firebaseToken ) . to . be . null ;
322+ } ) ;
321323 it ( 'is blocked if a beforeAuthStateChanged callback throws' , async ( ) => {
322324 await auth . _updateCurrentUser ( testUser ( auth , 'test' ) ) ;
323325 auth . beforeAuthStateChanged ( sinon . stub ( ) . throws ( ) ) ;
0 commit comments