test(backend): account for race conditions in verifyMagicLinkTokens test suite (#4969)
This commit is contained in:
parent
9cc8b68077
commit
ae5b745f5c
1 changed files with 4 additions and 3 deletions
|
|
@ -213,9 +213,10 @@ describe('verifyMagicLinkTokens', () => {
|
|||
|
||||
test('Should throw MAGIC_LINK_EXPIRED if passwordless token is expired', async () => {
|
||||
// validatePasswordlessTokens
|
||||
mockPrisma.verificationToken.findUniqueOrThrow.mockResolvedValueOnce(
|
||||
passwordlessData,
|
||||
);
|
||||
mockPrisma.verificationToken.findUniqueOrThrow.mockResolvedValueOnce({
|
||||
...passwordlessData,
|
||||
expiresOn: new Date('2020-01-01T00:00:00Z'),
|
||||
});
|
||||
// findUserById
|
||||
mockUser.findUserById.mockResolvedValue(O.some(user));
|
||||
// checkIfProviderAccountExists
|
||||
|
|
|
|||
Loading…
Reference in a new issue