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:
@@ -17,6 +17,8 @@ describe("MessagesService", () => {
|
||||
findAllConversations: jest.fn(),
|
||||
isParticipant: jest.fn(),
|
||||
findMessagesByConversationId: jest.fn(),
|
||||
markAsRead: jest.fn(),
|
||||
countUnreadMessages: jest.fn(),
|
||||
};
|
||||
|
||||
const mockEventsGateway = {
|
||||
|
||||
Reference in New Issue
Block a user