From 65469c49fcab21884b4b7648bbd2b53e95d37ae1 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 15 Nov 2022 13:26:48 -0800 Subject: [PATCH] format --- packages/auth/src/api/index.test.ts | 12 +++++++++--- packages/auth/test/helpers/mock_fetch.ts | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/auth/src/api/index.test.ts b/packages/auth/src/api/index.test.ts index c005c9ad3ba..74da561f273 100644 --- a/packages/auth/src/api/index.test.ts +++ b/packages/auth/src/api/index.test.ts @@ -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' @@ -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 ); @@ -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' diff --git a/packages/auth/test/helpers/mock_fetch.ts b/packages/auth/test/helpers/mock_fetch.ts index dc6e43f2e00..2d5794b7327 100644 --- a/packages/auth/test/helpers/mock_fetch.ts +++ b/packages/auth/test/helpers/mock_fetch.ts @@ -34,7 +34,10 @@ let fetchImpl: typeof fetch | null; const routes = new Map(); // 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'); }