update prettier config
This commit is contained in:
@ -20,5 +20,5 @@ export default resolver.pipe(
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -18,7 +18,7 @@ jest.mock("preview-email", () => jest.fn());
|
||||
describe.skip("forgotPassword mutation", () => {
|
||||
it("does not throw error if user doesn't exist", async () => {
|
||||
await expect(
|
||||
forgotPassword({ email: "no-user@email.com" }, {} as Ctx)
|
||||
forgotPassword({ email: "no-user@email.com" }, {} as Ctx),
|
||||
).resolves.not.toThrow();
|
||||
});
|
||||
|
||||
|
@ -53,21 +53,21 @@ describe.skip("resetPassword mutation", () => {
|
||||
|
||||
// Non-existent token
|
||||
await expect(
|
||||
resetPassword({ token: "no-token", password: "", passwordConfirmation: "" }, mockCtx)
|
||||
resetPassword({ token: "no-token", password: "", passwordConfirmation: "" }, mockCtx),
|
||||
).rejects.toThrowError();
|
||||
|
||||
// Expired token
|
||||
await expect(
|
||||
resetPassword(
|
||||
{ token: expiredToken, password: newPassword, passwordConfirmation: newPassword },
|
||||
mockCtx
|
||||
)
|
||||
mockCtx,
|
||||
),
|
||||
).rejects.toThrowError();
|
||||
|
||||
// Good token
|
||||
await resetPassword(
|
||||
{ token: goodToken, password: newPassword, passwordConfirmation: newPassword },
|
||||
mockCtx
|
||||
mockCtx,
|
||||
);
|
||||
|
||||
// Delete's the token
|
||||
@ -77,7 +77,7 @@ describe.skip("resetPassword mutation", () => {
|
||||
// Updates user's password
|
||||
const updatedUser = await db.user.findFirst({ where: { id: user.id } });
|
||||
expect(await SecurePassword.verify(updatedUser!.hashedPassword, newPassword)).toBe(
|
||||
SecurePassword.VALID
|
||||
SecurePassword.VALID,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user