Skip to content

Commit 6371ef5

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent 73e0ad2 commit 6371ef5

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

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

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ import { Endpoint } from '../../api';
2727
import { ServerError } from '../../api/errors';
2828
import { Operation } from '../../model/action_code_info';
2929
// import * as location from '../util/location';
30-
import { checkActionCode, confirmPasswordReset, sendPasswordResetEmail, verifyPasswordResetCode } from './email_and_password';
30+
import {
31+
checkActionCode,
32+
confirmPasswordReset,
33+
sendPasswordResetEmail,
34+
verifyPasswordResetCode
35+
} from './email_and_password';
3136

3237
use(chaiAsPromised);
3338
use(sinonChai);
@@ -60,9 +65,7 @@ describe('sendPasswordResetEmail', () => {
6065
},
6166
400
6267
);
63-
await expect(
64-
sendPasswordResetEmail(mockAuth, email)
65-
).to.be.rejectedWith(
68+
await expect(sendPasswordResetEmail(mockAuth, email)).to.be.rejectedWith(
6669
FirebaseError,
6770
'Firebase: The email address is badly formatted. (auth/invalid-email).'
6871
);
@@ -93,23 +96,23 @@ describe('sendPasswordResetEmail', () => {
9396
iosBundleId: 'my-bundle',
9497
iosAppStoreId: 'my-appstore-id'
9598
});
96-
});
99+
});
97100
});
98101

99102
context('on Android', () => {
100-
it('should pass action code parameters', async () => {
103+
it('should pass action code parameters', async () => {
101104
const mock = mockEndpoint(Endpoint.SEND_OOB_CODE, {
102105
email
103106
});
104107
await sendPasswordResetEmail(mockAuth, email, {
105-
handleCodeInApp: true,
106-
android: {
107-
installApp: false,
108-
minimumVersion: 'my-version',
109-
packageName: 'my-package'
110-
},
111-
url: 'my-url',
112-
dynamicLinkDomain: 'fdl-domain'
108+
handleCodeInApp: true,
109+
android: {
110+
installApp: false,
111+
minimumVersion: 'my-version',
112+
packageName: 'my-package'
113+
},
114+
url: 'my-url',
115+
dynamicLinkDomain: 'fdl-domain'
113116
});
114117
expect(mock.calls[0].request).to.eql({
115118
requestType: Operation.PASSWORD_RESET,
@@ -125,7 +128,6 @@ describe('sendPasswordResetEmail', () => {
125128
});
126129
});
127130

128-
129131
describe('confirmPasswordReset', () => {
130132
const oobCode = 'oob-code';
131133
const newPassword = 'new-password';
@@ -185,7 +187,7 @@ describe('checkActionCode', () => {
185187
email,
186188
fromEmail: null
187189
},
188-
operation: Operation.PASSWORD_RESET
190+
operation: Operation.PASSWORD_RESET
189191
});
190192
expect(mock.calls[0].request).to.eql({
191193
oobCode
@@ -215,9 +217,7 @@ describe('checkActionCode', () => {
215217
const mock = mockEndpoint(Endpoint.RESET_PASSWORD, {
216218
email
217219
});
218-
await expect(
219-
checkActionCode(mockAuth, oobCode)
220-
).to.be.rejectedWith(
220+
await expect(checkActionCode(mockAuth, oobCode)).to.be.rejectedWith(
221221
FirebaseError,
222222
'Firebase: An internal AuthError has occurred. (auth/internal-error).'
223223
);
@@ -235,9 +235,7 @@ describe('checkActionCode', () => {
235235
},
236236
400
237237
);
238-
await expect(
239-
checkActionCode(mockAuth, oobCode)
240-
).to.be.rejectedWith(
238+
await expect(checkActionCode(mockAuth, oobCode)).to.be.rejectedWith(
241239
FirebaseError,
242240
'Firebase: The action code is invalid. This can happen if the code is malformed]: expired]: or has already been used. (auth/invalid-action-code).'
243241
);
@@ -268,9 +266,7 @@ describe('verifyPasswordResetCode', () => {
268266
const mock = mockEndpoint(Endpoint.RESET_PASSWORD, {
269267
email
270268
});
271-
await expect(
272-
verifyPasswordResetCode(mockAuth, oobCode)
273-
).to.be.rejectedWith(
269+
await expect(verifyPasswordResetCode(mockAuth, oobCode)).to.be.rejectedWith(
274270
FirebaseError,
275271
'Firebase: An internal AuthError has occurred. (auth/internal-error).'
276272
);
@@ -288,13 +284,10 @@ describe('verifyPasswordResetCode', () => {
288284
},
289285
400
290286
);
291-
await expect(
292-
verifyPasswordResetCode(mockAuth, oobCode)
293-
).to.be.rejectedWith(
287+
await expect(verifyPasswordResetCode(mockAuth, oobCode)).to.be.rejectedWith(
294288
FirebaseError,
295289
'Firebase: The action code is invalid. This can happen if the code is malformed]: expired]: or has already been used. (auth/invalid-action-code).'
296290
);
297291
expect(mock.calls.length).to.eq(1);
298292
});
299293
});
300-

packages-exp/auth-exp/src/core/strategies/email_and_password.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
import { resetPassword } from '../../api/account_management/email_and_password';
1919
import * as api from '../../api/authentication/email_and_password';
2020
import { ActionCodeInfo, Operation } from '../../model/action_code_info';
21-
import { ActionCodeSettings, setActionCodeSettingsOnRequest } from '../../model/action_code_settings';
21+
import {
22+
ActionCodeSettings,
23+
setActionCodeSettingsOnRequest
24+
} from '../../model/action_code_settings';
2225
import { Auth } from '../../model/auth';
2326
import { AuthErrorCode, AUTH_ERROR_FACTORY } from '../errors';
2427

@@ -78,4 +81,4 @@ export async function verifyPasswordResetCode(
7881
): Promise<string> {
7982
const { data } = await checkActionCode(auth, code);
8083
return data.email!;
81-
}
84+
}

0 commit comments

Comments
 (0)