Skip to content

Commit

Permalink
refactor: mock useTrackEvent to stop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fbelginetw committed Oct 23, 2024
1 parent 76bd334 commit a010d83
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions opentrons-ai-client/src/OpentronsAI.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ vi.mock('./molecules/Header')
vi.mock('./molecules/Footer')
vi.mock('./molecules/Loading')
vi.mock('./resources/hooks/useGetAccessToken')
vi.mock('./analytics/mixpanel')

const mockUseTrackEvent = vi.fn()

vi.mock('./resources/hooks/useTrackEvent', () => ({
useTrackEvent: () => mockUseTrackEvent,
}))

const render = (): ReturnType<typeof renderWithProviders> => {
return renderWithProviders(<OpentronsAI />, {
Expand Down

0 comments on commit a010d83

Please sign in to comment.