Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Nov 15, 2022
1 parent 7bd7f52 commit 65469c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 9 additions & 3 deletions packages/auth/src/api/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ describe('api/_performApiRequest', () => {
);
assert.fail('Call should have failed');
} catch (e) {
expect((e as FirebaseError).code).to.eq(`auth/${AuthErrorCode.NEED_CONFIRMATION}`);
expect((e as FirebaseError).code).to.eq(
`auth/${AuthErrorCode.NEED_CONFIRMATION}`
);
expect((e as FirebaseError).customData!._tokenResponse).to.eql({
needConfirmation: true,
idToken: 'id-token'
Expand Down Expand Up @@ -413,7 +415,9 @@ describe('api/_performApiRequest', () => {
);
assert.fail('Call should have failed');
} catch (e) {
expect((e as FirebaseError).code).to.eq(`auth/${AuthErrorCode.CREDENTIAL_ALREADY_IN_USE}`);
expect((e as FirebaseError).code).to.eq(
`auth/${AuthErrorCode.CREDENTIAL_ALREADY_IN_USE}`
);
expect((e as FirebaseError).customData!._tokenResponse).to.eql(
response
);
Expand Down Expand Up @@ -444,7 +448,9 @@ describe('api/_performApiRequest', () => {
);
assert.fail('Call should have failed');
} catch (e) {
expect((e as FirebaseError).code).to.eq(`auth/${AuthErrorCode.EMAIL_EXISTS}`);
expect((e as FirebaseError).code).to.eq(
`auth/${AuthErrorCode.EMAIL_EXISTS}`
);
expect((e as FirebaseError).customData!.email).to.eq('email@test.com');
expect((e as FirebaseError).customData!.phoneNumber).to.eq(
'+1555-this-is-a-number'
Expand Down
5 changes: 4 additions & 1 deletion packages/auth/test/helpers/mock_fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ let fetchImpl: typeof fetch | null;
const routes = new Map<string, Route>();

// Using a constant rather than a function to enforce the type matches fetch()
const fakeFetch: typeof fetch = (input: RequestInfo | URL, request?: RequestInit) => {
const fakeFetch: typeof fetch = (
input: RequestInfo | URL,
request?: RequestInit
) => {
if (typeof input !== 'string') {
throw new Error('URL passed to fetch was not a string');
}
Expand Down

0 comments on commit 65469c4

Please sign in to comment.