Upgrade unimodules with expo to use expo-file-system

This commit is contained in:
Elias Nahum
2021-11-06 18:08:22 -03:00
parent 604b6facf2
commit 880cfbb7ac
20 changed files with 1505 additions and 990 deletions

View File

@@ -174,15 +174,13 @@ jest.mock('react-native-vector-icons', () => {
};
});
jest.mock('react-native-unimodules', () => ({
FileSystem: {
cacheDirectory: 'root/cache',
documentDirectory: 'root/documents',
deleteAsync: jest.fn().mockResolvedValue(true),
getInfoAsync: jest.fn().mockResolvedValue({exists: false}),
makeDirectoryAsync: jest.fn().mockResolvedValue(true),
readDirectoryAsync: jest.fn().mockResolvedValue([]),
},
jest.mock('expo-file-system', () => ({
cacheDirectory: 'root/cache',
documentDirectory: 'root/documents',
deleteAsync: jest.fn().mockResolvedValue(true),
getInfoAsync: jest.fn().mockResolvedValue({exists: false}),
makeDirectoryAsync: jest.fn().mockResolvedValue(true),
readDirectoryAsync: jest.fn().mockResolvedValue([]),
}));
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');