Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/fxa-graphql-api/src/gql/account.resolver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ describe('#integration - AccountResolver', () => {

describe('deleteSecondaryEmail', () => {
it('succeeds', async () => {
authClient.recoveryEmailDestroyWithJwt = jest.fn().mockResolvedValue(true);
authClient.recoveryEmailDestroyWithJwt = jest
.fn()
.mockResolvedValue(true);
const result = await resolver.deleteSecondaryEmail(headers, {
jwt: 'jwtToken',
clientMutationId: 'testid',
Expand Down Expand Up @@ -576,7 +578,7 @@ describe('#integration - AccountResolver', () => {
state: 'In' as 'in',
})
).rejects.toThrow(
'Invalid metrics opt state! State must be in or out, but recieved In.'
'Invalid metrics opt state! State must be in or out, but received In.'
);
});
});
Expand Down
8 changes: 6 additions & 2 deletions packages/fxa-graphql-api/src/gql/account.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ export class AccountResolver {
@GqlXHeaders() headers: Headers,
@Args('input', { type: () => EmailInput }) input: EmailInput
): Promise<BasicPayload> {
await this.authAPI.recoveryEmailDestroyWithJwt(input.jwt, input.email, headers);
await this.authAPI.recoveryEmailDestroyWithJwt(
input.jwt,
input.email,
headers
);
return { clientMutationId: input.clientMutationId };
}

Expand Down Expand Up @@ -456,7 +460,7 @@ export class AccountResolver {

if (!['in', 'out'].includes(input.state)) {
throw new Error(
`Invalid metrics opt state! State must be in or out, but recieved ${input.state}.`
`Invalid metrics opt state! State must be in or out, but received ${input.state}.`
);
}

Expand Down