fix: apply feedback

This commit is contained in:
yassinedorbozgithub
2025-05-13 08:23:39 +01:00
parent f156757045
commit 494f40db1d
2 changed files with 3 additions and 3 deletions

View File

@@ -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 () => {

View File

@@ -327,7 +327,7 @@ const ChatProvider: React.FC<{
);
const quickReplies = getQuickReplies(body.messages.at(-1));
if (getQuickReplies.length) {
if (quickReplies.length) {
setSuggestions(quickReplies);
}