-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.js
More file actions
39 lines (38 loc) · 1.18 KB
/
jest.setup.js
File metadata and controls
39 lines (38 loc) · 1.18 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Jest setup file to configure test environment
* Mocks expo-constants to provide environment variables to tests
*/
// Mock expo-constants to provide environment variables to the app
// eslint-disable-next-line no-undef
jest.mock('expo-constants', () => ({
expoConfig: {
extra: {
APP_ENV: 'development',
NAME: 'Test App',
SCHEME: 'testapp',
BUNDLE_ID: 'com.test.app',
PACKAGE: 'com.test.app',
VERSION: '1.0.0',
EXPO_PUBLIC_API_URL: 'https://api.test.com',
EXPO_PUBLIC_DEFAULT_LOCALE: 'en',
EXPO_PUBLIC_SENTRY_DSN: '',
EXPO_PUBLIC_AUTH_STORAGE_ENCRYPTION_KEY: 'test-encryption-key-that-is-at-least-32-characters-long-for-jest',
},
},
default: {
expoConfig: {
extra: {
APP_ENV: 'development',
NAME: 'Test App',
SCHEME: 'testapp',
BUNDLE_ID: 'com.test.app',
PACKAGE: 'com.test.app',
VERSION: '1.0.0',
EXPO_PUBLIC_API_URL: 'https://api.test.com',
EXPO_PUBLIC_DEFAULT_LOCALE: 'en',
EXPO_PUBLIC_SENTRY_DSN: '',
EXPO_PUBLIC_AUTH_STORAGE_ENCRYPTION_KEY: 'test-encryption-key-that-is-at-least-32-characters-long-for-jest',
},
},
},
}));