Skip to content

Commit

Permalink
fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TSlashDreamy committed Sep 7, 2023
1 parent bc18163 commit 8f8ccfd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/unit/pages/chat/Chat.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 8f8ccfd

Please sign in to comment.