diff --git a/tests/unit/pages/chat/Chat.spec.jsx b/tests/unit/pages/chat/Chat.spec.jsx index d8c5d8abd6..6d2a397d58 100644 --- a/tests/unit/pages/chat/Chat.spec.jsx +++ b/tests/unit/pages/chat/Chat.spec.jsx @@ -22,6 +22,14 @@ global.window.getComputedStyle = vi.fn().mockImplementation(() => ({ getPropertyValue: vi.fn() })) +const mockChatContext = { + setCurrentChatId: vi.fn() +} + +vi.mock('~/context/chat-context', () => ({ + useChatContext: () => mockChatContext +})) + const mockRef = { current: { scrollTo: vi.fn(), scrollHeight: 100 } } vi.mock('react', async () => {