Fix outdated backend service tests
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled

هذا الالتزام موجود في:
boutmoun123
2026-06-06 23:55:00 +03:00
الأصل 64719357bc
التزام f149b77139
2 ملفات معدلة مع 5 إضافات و0 حذوفات

عرض الملف

@@ -41,6 +41,9 @@ describe('CommentsService', () => {
const usersRepository = { const usersRepository = {
findByUsernames: jest.fn().mockResolvedValue([{ id: 'mentioned-user-id', username: 'new_mention' }]), findByUsernames: jest.fn().mockResolvedValue([{ id: 'mentioned-user-id', username: 'new_mention' }]),
}; };
const followsRepository = {
findOne: jest.fn(),
};
const service = new CommentsService( const service = new CommentsService(
commentsRepository as any, commentsRepository as any,
@@ -49,6 +52,7 @@ describe('CommentsService', () => {
feedVersionService as any, feedVersionService as any,
notificationsService as any, notificationsService as any,
usersRepository as any, usersRepository as any,
followsRepository as any,
); );
const result = await service.update(userId, commentId, { const result = await service.update(userId, commentId, {

عرض الملف

@@ -24,6 +24,7 @@ describe('LikesService', () => {
service.getStatus('user-1', { targetId: '507f1f77bcf86cd799439011', targetType: 'post' }), service.getStatus('user-1', { targetId: '507f1f77bcf86cd799439011', targetType: 'post' }),
).resolves.toEqual({ ).resolves.toEqual({
liked: false, liked: false,
reacted: false,
targetId: '507f1f77bcf86cd799439011', targetId: '507f1f77bcf86cd799439011',
targetType: 'post', targetType: 'post',
}); });