Add basic analytics (#89)

* Add basic analytics

* Fix: add mock for analytics
This commit is contained in:
Paul Frazee 2023-01-24 13:58:35 -06:00 committed by GitHub
parent f36c956536
commit 21f5f4de15
9 changed files with 190 additions and 14 deletions

View file

@ -40,3 +40,18 @@ jest.mock('react-native-tab-view', () => ({
...jest.requireActual('react-native-tab-view'),
TabView: mockedView,
}))
jest.mock('@segment/analytics-react-native', () => ({
createClient: () => ({
add: jest.fn(),
}),
useAnalytics: () => ({
track: jest.fn(),
identify: jest.fn(),
reset: jest.fn(),
group: jest.fn(),
screen: jest.fn(),
alias: jest.fn(),
flush: jest.fn(),
}),
}))