Files
pwap/mobile/jest.setup.before.cjs
T
pezkuwichain 1e1c2310c9 fix: Remove workspace config, fix test suite, update snapshots
- Remove root /home/mamostehp/package.json workspace config
- Each project now independent (aligned with CI workflow)
- Add SafeAreaProvider mock to jest setup
- Add __DEV__ global for React Native tests
- Update 4 snapshots for SafeAreaView changes
- All 29 test suites pass (122 tests)
2026-01-19 15:26:47 +03:00

23 lines
544 B
JavaScript

// Setup file that runs BEFORE setupFilesAfterEnv
// This is needed to mock Expo's winter runtime before it loads
// Define __DEV__ global for React Native
global.__DEV__ = true;
// Mock the __ExpoImportMetaRegistry getter to prevent winter errors
Object.defineProperty(global, '__ExpoImportMetaRegistry__', {
get() {
return {
get: () => ({}),
register: () => {},
};
},
configurable: true,
});
// Mock expo module
jest.mock('expo', () => ({
...jest.requireActual('expo'),
registerRootComponent: jest.fn(),
}));