chore: merge hoppscotch/patch into hoppscotch/next

This commit is contained in:
Andrew Bastin
2024-06-20 22:26:42 +05:30
52 changed files with 629 additions and 364 deletions

View File

@@ -157,7 +157,7 @@ beforeEach(() => {
describe('UserService', () => {
describe('findUserByEmail', () => {
test('should successfully return a valid user given a valid email', async () => {
mockPrisma.user.findUniqueOrThrow.mockResolvedValueOnce(user);
mockPrisma.user.findFirst.mockResolvedValueOnce(user);
const result = await userService.findUserByEmail(
'dwight@dundermifflin.com',
@@ -166,7 +166,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;