mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-12 09:51:01 +00:00
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)
This commit is contained in:
@@ -68,6 +68,18 @@ jest.mock('./src/contexts/ThemeContext', () => require('./src/__mocks__/contexts
|
||||
// Mock BiometricAuthContext globally
|
||||
jest.mock('./src/contexts/BiometricAuthContext', () => require('./src/__mocks__/contexts/BiometricAuthContext'));
|
||||
|
||||
// Mock react-native-safe-area-context
|
||||
jest.mock('react-native-safe-area-context', () => {
|
||||
const insets = { top: 0, right: 0, bottom: 0, left: 0 };
|
||||
return {
|
||||
SafeAreaProvider: ({ children }) => children,
|
||||
SafeAreaView: ({ children }) => children,
|
||||
useSafeAreaInsets: () => insets,
|
||||
useSafeAreaFrame: () => ({ x: 0, y: 0, width: 390, height: 844 }),
|
||||
initialWindowMetrics: { insets, frame: { x: 0, y: 0, width: 390, height: 844 } },
|
||||
};
|
||||
});
|
||||
|
||||
// Mock expo modules
|
||||
jest.mock('expo-linear-gradient', () => ({
|
||||
LinearGradient: 'LinearGradient',
|
||||
|
||||
Reference in New Issue
Block a user