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); }