chore: updated testcase for findUserByEmail in user module

This commit is contained in:
Balu Babu
2024-05-14 12:02:16 +05:30
parent 480a5f1f79
commit 5d05518024

View File

@@ -158,7 +158,7 @@ describe('UserService', () => {
});
test('should return a null user given a invalid email', async () => {
mockPrisma.user.findUniqueOrThrow.mockRejectedValueOnce('NotFoundError');
mockPrisma.user.findFirst.mockResolvedValueOnce(null);
const result = await userService.findUserByEmail('jim@dundermifflin.com');
expect(result).resolves.toBeNone;