Skip to content

Commit 8333925

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent 5de57cd commit 8333925

File tree

4 files changed

+22
-27
lines changed

4 files changed

+22
-27
lines changed

packages-exp/auth-exp/src/core/strategies/credential.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('core/strategies/signInWithCredential', () => {
4242
createdAt: 123,
4343
lastLoginAt: 456
4444
};
45-
45+
4646
const idTokenResponse: IdTokenResponse = {
4747
idToken: 'my-id-token',
4848
refreshToken: 'my-refresh-token',
@@ -51,7 +51,10 @@ describe('core/strategies/signInWithCredential', () => {
5151
kind: 'my-kind'
5252
};
5353

54-
const authCredential = new MockAuthCredential(ProviderId.FIREBASE, SignInMethod.EMAIL_LINK);
54+
const authCredential = new MockAuthCredential(
55+
ProviderId.FIREBASE,
56+
SignInMethod.EMAIL_LINK
57+
);
5558

5659
beforeEach(() => {
5760
mockFetch.setUp();
@@ -63,17 +66,20 @@ describe('core/strategies/signInWithCredential', () => {
6366
afterEach(mockFetch.tearDown);
6467

6568
it('should return a valid user credential', async () => {
66-
const {credential, user, operationType } = await signInWithCredential(mockAuth, authCredential);
69+
const { credential, user, operationType } = await signInWithCredential(
70+
mockAuth,
71+
authCredential
72+
);
6773
expect(credential!.providerId).to.eq(ProviderId.FIREBASE);
6874
expect(credential!.signInMethod).to.eq(SignInMethod.EMAIL_LINK);
6975
expect(user.uid).to.eq('local-id');
7076
expect(user.tenantId).to.eq('tenant-id');
7177
expect(user.displayName).to.eq('display-name');
7278
expect(operationType).to.eq(OperationType.SIGN_IN);
7379
});
74-
80+
7581
it('should update the current user', async () => {
7682
const { user } = await signInWithCredential(mockAuth, authCredential);
7783
expect(mockAuth.currentUser).to.eq(user);
7884
});
79-
});
85+
});

packages-exp/auth-exp/src/core/user/user_impl.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ describe('core/user/user_impl', () => {
240240
auth.onAuthStateChanged(cb);
241241
await auth.updateCurrentUser(null);
242242
cb.resetHistory();
243-
243+
244244
await UserImpl._fromIdTokenResponse(mockAuth, idTokenResponse);
245245
expect(cb).not.to.have.been.called;
246246
});

packages-exp/auth-exp/test/mock_auth.ts

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,17 @@ export const TEST_TOKEN_HOST = 'localhost/token';
2626
export const TEST_SCHEME = 'mock';
2727
export const TEST_KEY = 'test-api-key';
2828

29-
export const mockAuth: Auth = ({
30-
name: 'test-app',
31-
config: {
29+
export const mockAuth: Auth = new AuthImpl(
30+
'test-app',
31+
{
3232
apiKey: TEST_KEY,
33+
authDomain: TEST_AUTH_DOMAIN,
3334
apiHost: TEST_HOST,
3435
apiScheme: TEST_SCHEME,
35-
tokenApiHost: TEST_TOKEN_HOST,
3636
sdkClientVersion: 'testSDK/0.0.0'
3737
},
38-
_isInitialized: true,
39-
currentUser: null,
40-
async setPersistence() {},
41-
async updateCurrentUser() {},
42-
async signOut() {},
43-
onAuthStateChanged() {
44-
return () => {};
45-
},
46-
onIdTokenChanged() {
47-
return () => {};
48-
},
49-
_notifyStateListeners() {}
50-
} as unknown) as Auth;
38+
[]
39+
);
5140

5241
export function testUser(
5342
uid: string,

packages-exp/auth-exp/test/mock_auth_credential.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
import { PhoneOrOauthTokenResponse } from '../src/api/authentication/mfa';
19-
import { ProviderId, SignInMethod } from "../src/core/providers";
19+
import { ProviderId, SignInMethod } from '../src/core/providers';
2020
import { Auth } from '../src/model/auth';
2121
import { AuthCredential } from '../src/model/auth_credential';
2222
import { IdTokenResponse } from '../src/model/id_token';
@@ -27,15 +27,15 @@ export class MockAuthCredential implements AuthCredential {
2727
constructor(
2828
readonly providerId: ProviderId,
2929
readonly signInMethod: SignInMethod
30-
) { }
30+
) {}
3131

3232
toJSON(): object {
3333
throw new Error('Method not implemented.');
3434
}
3535

3636
/**
3737
* For testing purposes only
38-
* @param response
38+
* @param response
3939
*/
4040
_setIdTokenResponse(response: PhoneOrOauthTokenResponse): void {
4141
this.response = response;
@@ -52,4 +52,4 @@ export class MockAuthCredential implements AuthCredential {
5252
_matchIdTokenWithUid(_auth: Auth, _uid: string): Promise<IdTokenResponse> {
5353
throw new Error('Method not implemented.');
5454
}
55-
}
55+
}

0 commit comments

Comments
 (0)