From 494f40db1d8ab9fdd804f6e802fb91db148bb602 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Tue, 13 May 2025 08:23:39 +0100 Subject: [PATCH] fix: apply feedback --- api/src/websocket/websocket.gateway.spec.ts | 4 ++-- widget/src/providers/ChatProvider.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/websocket/websocket.gateway.spec.ts b/api/src/websocket/websocket.gateway.spec.ts index e3fc595a..8c6cc1cb 100644 --- a/api/src/websocket/websocket.gateway.spec.ts +++ b/api/src/websocket/websocket.gateway.spec.ts @@ -153,11 +153,11 @@ describe('WebsocketGateway', () => { it('should throw an error when socket array is empty', async () => { jest.spyOn(gateway, 'getNotificationSockets').mockResolvedValueOnce([]); - expect(gateway.getNotificationSockets).toHaveBeenCalledWith('sessionId'); - await expect( gateway.joinNotificationSockets('sessionId', Room.MESSAGE), ).rejects.toThrow('No notification sockets found!'); + + expect(gateway.getNotificationSockets).toHaveBeenCalledWith('sessionId'); }); it('should throw an error with empty sessionId', async () => { diff --git a/widget/src/providers/ChatProvider.tsx b/widget/src/providers/ChatProvider.tsx index 9cc6605c..ce4bb9e3 100644 --- a/widget/src/providers/ChatProvider.tsx +++ b/widget/src/providers/ChatProvider.tsx @@ -327,7 +327,7 @@ const ChatProvider: React.FC<{ ); const quickReplies = getQuickReplies(body.messages.at(-1)); - if (getQuickReplies.length) { + if (quickReplies.length) { setSuggestions(quickReplies); }