Skip to content

Commit ac92c28

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent fb619ba commit ac92c28

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ export async function signUp(
2323
Endpoint.SIGN_UP,
2424
request
2525
);
26-
}
26+
}

packages-exp/auth-exp/src/model/action_code_info.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export enum Operation {
33
RECOVER_EMAIL = 'RECOVER_EMAIL',
44
EMAIL_SIGNIN = 'EMAIL_SIGNIN',
55
VERIFY_EMAIL = 'VERIFY_EMAIL'
6-
}
6+
}

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

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ describe('signUp', () => {
3333
afterEach(mockFetch.tearDown);
3434

3535
it('should POST to the correct endpoint', async () => {
36-
const mock = mockEndpoint(Endpoint.SIGN_UP, { displayName: 'my-name', email: '[email protected]' });
36+
const mock = mockEndpoint(Endpoint.SIGN_UP, {
37+
displayName: 'my-name',
38+
39+
});
3740

3841
const response = await signUp(mockAuth, request);
3942
expect(response.displayName).to.eq('my-name');
@@ -44,26 +47,32 @@ describe('signUp', () => {
4447
});
4548

4649
it('should handle errors', async () => {
47-
const mock = mockEndpoint(Endpoint.SIGN_UP, {
48-
error: {
49-
code: 400,
50-
message: ServerError.EMAIL_EXISTS,
51-
errors: [
52-
{
53-
message: ServerError.EMAIL_EXISTS,
54-
}
55-
]
56-
}
57-
}, 400);
50+
const mock = mockEndpoint(
51+
Endpoint.SIGN_UP,
52+
{
53+
error: {
54+
code: 400,
55+
message: ServerError.EMAIL_EXISTS,
56+
errors: [
57+
{
58+
message: ServerError.EMAIL_EXISTS
59+
}
60+
]
61+
}
62+
},
63+
400
64+
);
5865

5966
try {
6067
await signUp(mockAuth, request);
6168
} catch (e) {
6269
expect(e.name).to.eq('FirebaseError');
63-
expect(e.message).to.eq('Firebase: The email address is already in use by another account. (auth/email-already-in-use).');
70+
expect(e.message).to.eq(
71+
'Firebase: The email address is already in use by another account. (auth/email-already-in-use).'
72+
);
6473
expect(mock.calls[0]).to.eql({
6574
request
6675
});
6776
}
6877
});
69-
});
78+
});

packages-exp/auth-exp/test/api/helper.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ export const mockAuth: Auth = {
1515
}
1616
};
1717

18-
export function mockEndpoint(endpoint: Endpoint, response: object, status = 200): Route {
19-
return mock(`${TEST_SCHEME}://${TEST_HOST}${endpoint}?key=${TEST_KEY}`, response, status);
20-
}
18+
export function mockEndpoint(
19+
endpoint: Endpoint,
20+
response: object,
21+
status = 200
22+
): Route {
23+
return mock(
24+
`${TEST_SCHEME}://${TEST_HOST}${endpoint}?key=${TEST_KEY}`,
25+
response,
26+
status
27+
);
28+
}

0 commit comments

Comments
 (0)