forked from UCSD/campus-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.setup.js
More file actions
27 lines (21 loc) · 823 Bytes
/
tests.setup.js
File metadata and controls
27 lines (21 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Needed to properly mock react-native-google-analytics-bridge
import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge'
// Mock AppSettings here explicitly
// Needed because dev and prod values can differ, which may
// break certain snapshots under different testing environments
const AppSettingsMock = jest.genMockFromModule('./app/AppSettings')
AppSettingsMock.APP_NAME = 'Campus Mobile'
jest.setMock('./app/AppSettings', AppSettingsMock)
// Mock native modules here
// Mock Google analytics
// used by various components
jest.mock('react-native-google-analytics-bridge')
// Mock bugsnag
jest.mock('bugsnag-react-native')
// Mock react-native-simple-toast
// used by Feedback and NearbyMapView
jest.mock('react-native-simple-toast', () => {
return {
showWithGravity: () => jest.fn()
}
})