Skip to content

Commit 4ac327f

Browse files
committed
updating unit test
1 parent e82b6e6 commit 4ac327f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

packages/auth/src/core/auth/auth_impl.test.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)