Skip to content

Commit 54d00b6

Browse files
committed
Formatting
1 parent 1b9494b commit 54d00b6

35 files changed

+162
-98
lines changed

packages-exp/auth-exp/src/api/account_management/email_and_password.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('api/account_management/resetPassword', () => {
3535
oobCode: 'oob-code',
3636
newPassword: 'new-password'
3737
};
38-
38+
3939
let auth: Auth;
4040

4141
beforeEach(async () => {
@@ -99,7 +99,7 @@ describe('api/account_management/updateEmailPassword', () => {
9999
auth = await testAuth();
100100
mockFetch.setUp();
101101
});
102-
102+
103103
afterEach(mockFetch.tearDown);
104104

105105
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/account_management/mfa.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('api/account_management/startEnrollPhoneMfa', () => {
4545
auth = await testAuth();
4646
mockFetch.setUp();
4747
});
48-
48+
4949
afterEach(mockFetch.tearDown);
5050

5151
it('should POST to the correct endpoint', async () => {
@@ -106,7 +106,7 @@ describe('api/account_management/enrollPhoneMfa', () => {
106106
auth = await testAuth();
107107
mockFetch.setUp();
108108
});
109-
109+
110110
afterEach(mockFetch.tearDown);
111111

112112
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/account_management/profile.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('api/account_management/updateProfile', () => {
4343
auth = await testAuth();
4444
mockFetch.setUp();
4545
});
46-
46+
4747
afterEach(mockFetch.tearDown);
4848

4949
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/create_auth_uri.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('api/authentication/createAuthUri', () => {
4242
auth = await testAuth();
4343
mockFetch.setUp();
4444
});
45-
45+
4646
afterEach(mockFetch.tearDown);
4747

4848
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/custom_token.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('api/authentication/signInWithCustomToken', () => {
4242
auth = await testAuth();
4343
mockFetch.setUp();
4444
});
45-
45+
4646
afterEach(mockFetch.tearDown);
4747

4848
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/email_and_password.test.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ import { Operation } from '../../model/action_code_info';
2828
import { Auth } from '../../model/auth';
2929
import { ServerError } from '../errors';
3030
import {
31-
EmailSignInRequest, PasswordResetRequest, sendEmailVerification, sendPasswordResetEmail,
32-
sendSignInLinkToEmail, signInWithPassword, VerifyEmailRequest
31+
EmailSignInRequest,
32+
PasswordResetRequest,
33+
sendEmailVerification,
34+
sendPasswordResetEmail,
35+
sendSignInLinkToEmail,
36+
signInWithPassword,
37+
VerifyEmailRequest
3338
} from './email_and_password';
3439

3540
use(chaiAsPromised);
@@ -47,7 +52,7 @@ describe('api/authentication/signInWithPassword', () => {
4752
auth = await testAuth();
4853
mockFetch.setUp();
4954
});
50-
55+
5156
afterEach(mockFetch.tearDown);
5257

5358
it('should POST to the correct endpoint', async () => {
@@ -104,7 +109,7 @@ describe('api/authentication/sendEmailVerification', () => {
104109
auth = await testAuth();
105110
mockFetch.setUp();
106111
});
107-
112+
108113
afterEach(mockFetch.tearDown);
109114

110115
it('should POST to the correct endpoint', async () => {
@@ -159,7 +164,7 @@ describe('api/authentication/sendPasswordResetEmail', () => {
159164
auth = await testAuth();
160165
mockFetch.setUp();
161166
});
162-
167+
163168
afterEach(mockFetch.tearDown);
164169

165170
it('should POST to the correct endpoint', async () => {
@@ -214,7 +219,7 @@ describe('api/authentication/sendSignInLinkToEmail', () => {
214219
auth = await testAuth();
215220
mockFetch.setUp();
216221
});
217-
222+
218223
afterEach(mockFetch.tearDown);
219224

220225
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/email_link.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('api/authentication/signInWithEmailLink', () => {
4242
auth = await testAuth();
4343
mockFetch.setUp();
4444
});
45-
45+
4646
afterEach(mockFetch.tearDown);
4747

4848
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/idp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('api/authentication/signInWithIdp', () => {
4343
auth = await testAuth();
4444
mockFetch.setUp();
4545
});
46-
46+
4747
afterEach(mockFetch.tearDown);
4848

4949
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/mfa.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('api/authentication/startSignInPhoneMfa', () => {
4545
auth = await testAuth();
4646
mockFetch.setUp();
4747
});
48-
48+
4949
afterEach(mockFetch.tearDown);
5050

5151
it('should POST to the correct endpoint', async () => {
@@ -107,7 +107,7 @@ describe('api/authentication/finalizeSignInPhoneMfa', () => {
107107
auth = await testAuth();
108108
mockFetch.setUp();
109109
});
110-
110+
111111
afterEach(mockFetch.tearDown);
112112

113113
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/recaptcha.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('api/authentication/getRecaptchaParams', () => {
3737
auth = await testAuth();
3838
mockFetch.setUp();
3939
});
40-
40+
4141
afterEach(mockFetch.tearDown);
4242

4343
it('should GET to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/sign_up.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('api/authentication/signUp', () => {
4343
auth = await testAuth();
4444
mockFetch.setUp();
4545
});
46-
46+
4747
afterEach(mockFetch.tearDown);
4848

4949
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/sms.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ import * as mockFetch from '../../../test/mock_fetch';
2828
import { Auth } from '../../model/auth';
2929
import { ServerError } from '../errors';
3030
import {
31-
linkWithPhoneNumber, sendPhoneVerificationCode, signInWithPhoneNumber,
32-
verifyPhoneNumberForExisting
31+
linkWithPhoneNumber,
32+
sendPhoneVerificationCode,
33+
signInWithPhoneNumber,
34+
verifyPhoneNumberForExisting
3335
} from './sms';
3436

3537
use(chaiAsPromised);
@@ -46,7 +48,7 @@ describe('api/authentication/sendPhoneVerificationCode', () => {
4648
auth = await testAuth();
4749
mockFetch.setUp();
4850
});
49-
51+
5052
afterEach(mockFetch.tearDown);
5153

5254
it('should POST to the correct endpoint', async () => {
@@ -81,9 +83,7 @@ describe('api/authentication/sendPhoneVerificationCode', () => {
8183
400
8284
);
8385

84-
await expect(
85-
sendPhoneVerificationCode(auth, request)
86-
).to.be.rejectedWith(
86+
await expect(sendPhoneVerificationCode(auth, request)).to.be.rejectedWith(
8787
FirebaseError,
8888
'Firebase: The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code]. (auth/invalid-phone-number).'
8989
);
@@ -105,7 +105,7 @@ describe('api/authentication/signInWithPhoneNumber', () => {
105105
auth = await testAuth();
106106
mockFetch.setUp();
107107
});
108-
108+
109109
afterEach(mockFetch.tearDown);
110110

111111
it('should POST to the correct endpoint', async () => {
@@ -170,7 +170,7 @@ describe('api/authentication/linkWithPhoneNumber', () => {
170170
auth = await testAuth();
171171
mockFetch.setUp();
172172
});
173-
173+
174174
afterEach(mockFetch.tearDown);
175175

176176
it('should POST to the correct endpoint', async () => {
@@ -234,7 +234,7 @@ describe('api/authentication/verifyPhoneNumberForExisting', () => {
234234
auth = await testAuth();
235235
mockFetch.setUp();
236236
});
237-
237+
238238
afterEach(mockFetch.tearDown);
239239

240240
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/authentication/token.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ describe('requestStsToken', () => {
3838
endpoint = `${apiScheme}://${tokenApiHost}/${_ENDPOINT}?key=${apiKey}`;
3939
fetch.setUp();
4040
});
41-
42-
41+
4342
afterEach(fetch.tearDown);
4443

4544
it('should POST to the correct endpoint', async () => {

packages-exp/auth-exp/src/api/index.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ import { testAuth } from '../../test/mock_auth';
2626
import * as mockFetch from '../../test/mock_fetch';
2727
import { AuthErrorCode } from '../core/errors';
2828
import { Auth } from '../model/auth';
29-
import { _performApiRequest, DEFAULT_API_TIMEOUT_MS, Endpoint, HttpMethod } from './';
29+
import {
30+
_performApiRequest,
31+
DEFAULT_API_TIMEOUT_MS,
32+
Endpoint,
33+
HttpMethod
34+
} from './';
3035
import { ServerError } from './errors';
3136

3237
use(chaiAsPromised);

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ import { inMemoryPersistence } from '../persistence/in_memory';
3232
import { PersistenceUserManager } from '../persistence/persistence_user_manager';
3333
import { _getClientVersion, ClientPlatform } from '../util/version';
3434
import {
35-
DEFAULT_API_HOST, DEFAULT_API_SCHEME, DEFAULT_TOKEN_API_HOST, initializeAuth
35+
DEFAULT_API_HOST,
36+
DEFAULT_API_SCHEME,
37+
DEFAULT_TOKEN_API_HOST,
38+
initializeAuth
3639
} from './auth_impl';
3740

3841
use(sinonChai);
@@ -52,7 +55,9 @@ describe('core/auth/auth_impl', () => {
5255

5356
beforeEach(() => {
5457
persistenceStub = sinon.stub(inMemoryPersistence as Persistence);
55-
auth = initializeAuth(FAKE_APP, { persistence: inMemoryPersistence }) as Auth;
58+
auth = initializeAuth(FAKE_APP, {
59+
persistence: inMemoryPersistence
60+
}) as Auth;
5661
});
5762

5863
afterEach(sinon.restore);

packages-exp/auth-exp/src/core/auth/auth_impl.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ import { getApp } from '@firebase/app-exp';
1919
import { FirebaseApp } from '@firebase/app-types-exp';
2020
import * as externs from '@firebase/auth-types-exp';
2121
import {
22-
CompleteFn, createSubscribe, ErrorFn, NextFn, Observer, Subscribe, Unsubscribe
22+
CompleteFn,
23+
createSubscribe,
24+
ErrorFn,
25+
NextFn,
26+
Observer,
27+
Subscribe,
28+
Unsubscribe
2329
} from '@firebase/util';
2430

2531
import { Auth, Dependencies, NextOrObserver } from '../../model/auth';
@@ -56,11 +62,12 @@ export class AuthImpl implements Auth {
5662

5763
constructor(
5864
public readonly name: string,
59-
public readonly config: externs.Config,
60-
) {
61-
}
65+
public readonly config: externs.Config
66+
) {}
6267

63-
_initializeWithPersistence(persistenceHierarchy: Persistence[]): Promise<void> {
68+
_initializeWithPersistence(
69+
persistenceHierarchy: Persistence[]
70+
): Promise<void> {
6471
return this.queue(async () => {
6572
this.persistenceManager = await PersistenceUserManager.create(
6673
this,

packages-exp/auth-exp/src/core/persistence/browser.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717

1818
import * as externs from '@firebase/auth-types-exp';
1919

20-
import { Persistence, PersistenceType, PersistenceValue, STORAGE_AVAILABLE_KEY } from './';
20+
import {
21+
Persistence,
22+
PersistenceType,
23+
PersistenceValue,
24+
STORAGE_AVAILABLE_KEY
25+
} from './';
2126

2227
class BrowserPersistence implements Persistence {
2328
type: PersistenceType = PersistenceType.LOCAL;

packages-exp/auth-exp/src/core/persistence/indexed_db.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
import * as externs from '@firebase/auth-types-exp';
1919

2020
import {
21-
PersistedBlob, Persistence, PersistenceType, PersistenceValue, STORAGE_AVAILABLE_KEY
21+
PersistedBlob,
22+
Persistence,
23+
PersistenceType,
24+
PersistenceValue,
25+
STORAGE_AVAILABLE_KEY
2226
} from './';
2327

2428
export const DB_NAME = 'firebaseLocalStorageDb';

packages-exp/auth-exp/src/core/persistence/persistence_user_manager.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('core/persistence/persistence_user_manager', () => {
5555
beforeEach(async () => {
5656
auth = await testAuth();
5757
});
58-
58+
5959
describe('.create', () => {
6060
it('defaults to inMemory if no list provided', async () => {
6161
const manager = await PersistenceUserManager.create(auth, []);
@@ -86,11 +86,7 @@ describe('core/persistence/persistence_user_manager', () => {
8686

8787
it('uses user key if provided', async () => {
8888
const { stub, persistence } = makePersistence();
89-
await PersistenceUserManager.create(
90-
auth,
91-
[persistence],
92-
'redirectUser'
93-
);
89+
await PersistenceUserManager.create(auth, [persistence], 'redirectUser');
9490
expect(stub.get).to.have.been.calledWith(
9591
'firebase:redirectUser:test-api-key:test-app'
9692
);

packages-exp/auth-exp/src/core/persistence/persistence_user_manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ export class PersistenceUserManager {
8888
userKey = _AUTH_USER_KEY_NAME
8989
): Promise<PersistenceUserManager> {
9090
if (!persistenceHierarchy.length) {
91-
return new PersistenceUserManager(inMemoryPersistence as Persistence, auth, userKey);
91+
return new PersistenceUserManager(
92+
inMemoryPersistence as Persistence,
93+
auth,
94+
userKey
95+
);
9296
}
9397

9498
const key = _persistenceKeyName(userKey, auth.config.apiKey, auth.name);

packages-exp/auth-exp/src/core/persistence/react_native.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717

1818
import { ReactNativeAsyncStorage } from '@firebase/auth-types-exp';
1919

20-
import { Persistence, PersistenceType, PersistenceValue, STORAGE_AVAILABLE_KEY } from './';
20+
import {
21+
Persistence,
22+
PersistenceType,
23+
PersistenceValue,
24+
STORAGE_AVAILABLE_KEY
25+
} from './';
2126

2227
/**
2328
* Persistence class that wraps AsyncStorage imported from `react-native` or `@react-native-community/async-storage`.

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
import { expect, use } from 'chai';
1919
import * as chaiAsPromised from 'chai-as-promised';
2020

21-
import { OperationType, ProviderId, SignInMethod } from '@firebase/auth-types-exp';
21+
import {
22+
OperationType,
23+
ProviderId,
24+
SignInMethod
25+
} from '@firebase/auth-types-exp';
2226

2327
import { mockEndpoint } from '../../../test/api/helper';
2428
import { testAuth } from '../../../test/mock_auth';

0 commit comments

Comments
 (0)