fix unit tests
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 12m18s

This commit is contained in:
2025-12-29 16:41:28 -08:00
parent 262062f468
commit 542cdfbb82

View File

@@ -227,7 +227,7 @@ describe('AuthService', () => {
});
it('should log warning and return undefined for non-existent user', async () => {
vi.mocked(userRepo.findUserByEmail).mockResolvedValue(null);
vi.mocked(userRepo.findUserByEmail).mockResolvedValue(undefined);
const result = await authService.resetPassword('unknown@example.com', reqLog);
@@ -295,7 +295,7 @@ describe('AuthService', () => {
});
it('should return null if token not found', async () => {
vi.mocked(userRepo.findUserByRefreshToken).mockResolvedValue(null);
vi.mocked(userRepo.findUserByRefreshToken).mockResolvedValue(undefined);
const result = await authService.getUserByRefreshToken('invalid-token', reqLog);
@@ -330,7 +330,7 @@ describe('AuthService', () => {
});
it('should return null if user not found', async () => {
vi.mocked(userRepo.findUserByRefreshToken).mockResolvedValue(null);
vi.mocked(userRepo.findUserByRefreshToken).mockResolvedValue(undefined);
const result = await authService.refreshAccessToken('invalid-token', reqLog);
expect(result).toBeNull();
});