|
17 | 17 |
|
18 | 18 | import { expect } from 'chai';
|
19 | 19 |
|
20 |
| -import { OperationType, ProviderId, UserProfile } from '@firebase/auth-types-exp'; |
| 20 | +import { |
| 21 | + OperationType, |
| 22 | + ProviderId, |
| 23 | + UserProfile |
| 24 | +} from '@firebase/auth-types-exp'; |
21 | 25 |
|
22 | 26 | import { IdTokenResponse, IdTokenResponseKind } from '../../model/id_token';
|
23 |
| -import { _fromIdTokenResponse, getAdditionalUserInfo } from './additional_user_info'; |
| 27 | +import { |
| 28 | + _fromIdTokenResponse, |
| 29 | + getAdditionalUserInfo |
| 30 | +} from './additional_user_info'; |
24 | 31 | import { base64Encode } from '@firebase/util';
|
25 | 32 | import { UserCredentialImpl } from './user_credential_impl';
|
26 | 33 | import { Auth } from '../../model/auth';
|
@@ -225,7 +232,7 @@ describe('core/user/additional_user_info', () => {
|
225 | 232 | cred = new UserCredentialImpl({
|
226 | 233 | user,
|
227 | 234 | providerId: null,
|
228 |
| - operationType: OperationType.SIGN_IN, |
| 235 | + operationType: OperationType.SIGN_IN |
229 | 236 | });
|
230 | 237 | });
|
231 | 238 |
|
@@ -266,12 +273,8 @@ describe('core/user/additional_user_info', () => {
|
266 | 273 |
|
267 | 274 | it('returns bespoke info if existing anonymous user', () => {
|
268 | 275 | // Note that _tokenResponse is not set on cred
|
269 |
| - (user as unknown as Record<string, unknown>).isAnonymous = true; |
270 |
| - const { |
271 |
| - isNewUser, |
272 |
| - providerId, |
273 |
| - profile |
274 |
| - } = getAdditionalUserInfo(cred)!; |
| 276 | + ((user as unknown) as Record<string, unknown>).isAnonymous = true; |
| 277 | + const { isNewUser, providerId, profile } = getAdditionalUserInfo(cred)!; |
275 | 278 | expect(isNewUser).to.be.false;
|
276 | 279 | expect(providerId).to.be.null;
|
277 | 280 | expect(profile).to.eq(profile);
|
|
0 commit comments