test: improve unit tests with new mocks and WebSocket validation

- Added `markAsRead` and `countUnreadMessages` mocks to `MessagesService` tests.
- Included enriched comment retrieval and WebSocket notification validation in `CommentsService` tests.
- Updated dependency injection to include `EventsGateway` in `CommentsService` tests.
This commit is contained in:
Mathis HERRIOT
2026-01-29 15:54:16 +01:00
parent 50787c9357
commit 8eb0cba050
2 changed files with 19 additions and 1 deletions

View File

@@ -17,6 +17,8 @@ describe("MessagesService", () => {
findAllConversations: jest.fn(),
isParticipant: jest.fn(),
findMessagesByConversationId: jest.fn(),
markAsRead: jest.fn(),
countUnreadMessages: jest.fn(),
};
const mockEventsGateway = {