feat: expand backend admin marketplace and scaling
فشلت بعض الفحوصات
/ deploy (push) Failing after 1m22s

هذا الالتزام موجود في:
2026-05-14 16:17:12 +03:00
الأصل 0e76a4a9fc
التزام 5bd5e19a89
158 ملفات معدلة مع 19563 إضافات و3315 حذوفات

عرض الملف

@@ -2,6 +2,35 @@ import { NotFoundException } from '@nestjs/common';
import { NotificationsService } from './notifications.service';
describe('NotificationsService', () => {
it('creates mention notifications with mention type', async () => {
const notificationsRepository = {
create: jest.fn().mockResolvedValue({ toJSON: () => ({ _id: 'notification-1' }) }),
countUnread: jest.fn().mockResolvedValue(5),
};
const notificationsGateway = {
emitCreated: jest.fn(),
};
const service = new NotificationsService(
notificationsRepository as any,
notificationsGateway as any,
);
await service.createMentionNotification(
'507f1f77bcf86cd799439011',
'507f191e810c19729de860ea',
'507f1f77bcf86cd799439012',
{ previewText: 'Hello @rami' },
);
expect(notificationsRepository.create).toHaveBeenCalledWith(
expect.objectContaining({
type: 'mention',
previewText: 'Hello @rami',
}),
);
});
it('recalculates unread count after markAllRead', async () => {
const notificationsRepository = {
markAllRead: jest.fn().mockResolvedValue(4),