-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathjest.setup.js
More file actions
25 lines (25 loc) 路 827 Bytes
/
Copy pathjest.setup.js
File metadata and controls
25 lines (25 loc) 路 827 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
// Mock react-native-localize
jest.mock('react-native-localize', () => ({
findBestLanguageTag: jest.fn(() => ({
languageTag: 'en',
isRTL: false,
})),
getLocales: jest.fn(() => [
{ countryCode: 'US', languageTag: 'en-US', languageCode: 'en', isRTL: false },
]),
getNumberFormatSettings: jest.fn(() => ({
decimalSeparator: '.',
groupingSeparator: ',',
})),
getCalendar: jest.fn(() => 'gregorian'),
getCountry: jest.fn(() => 'US'),
getCurrencies: jest.fn(() => ['USD']),
getTemperatureUnit: jest.fn(() => 'celsius'),
getTimeZone: jest.fn(() => 'UTC'),
uses24HourClock: jest.fn(() => true),
usesMetricSystem: jest.fn(() => true),
usesAutoDateAndTime: jest.fn(() => true),
usesAutoTimeZone: jest.fn(() => true),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
}));