migrate to expo-file-system
This commit is contained in:
+13
-8
@@ -1,10 +1,10 @@
|
||||
/* global jest */
|
||||
import {configure} from '@testing-library/react-native'
|
||||
import 'react-native-gesture-handler/jestSetup'
|
||||
|
||||
// IMPORTANT: this is what's used in the native runtime
|
||||
import 'react-native-url-polyfill/auto'
|
||||
|
||||
import {configure} from '@testing-library/react-native'
|
||||
|
||||
configure({asyncUtilTimeout: 20000})
|
||||
|
||||
jest.mock('@react-native-async-storage/async-storage', () =>
|
||||
@@ -36,14 +36,19 @@ jest.mock('react-native-safe-area-context', () => {
|
||||
}
|
||||
})
|
||||
|
||||
jest.mock('rn-fetch-blob', () => ({
|
||||
config: jest.fn().mockReturnThis(),
|
||||
cancel: jest.fn(),
|
||||
fetch: jest.fn(),
|
||||
jest.mock('expo-file-system', () => ({
|
||||
createDownloadResumable: jest.fn(),
|
||||
deleteAsync: jest.fn(),
|
||||
getInfoAsync: jest.fn().mockResolvedValue({
|
||||
size: 100,
|
||||
}),
|
||||
}))
|
||||
|
||||
jest.mock('@bam.tech/react-native-image-resizer', () => ({
|
||||
createResizedImage: jest.fn(),
|
||||
jest.mock('expo-image-manipulator', () => ({
|
||||
manipulateAsync: jest.fn().mockResolvedValue({
|
||||
uri: 'file://resized-image',
|
||||
}),
|
||||
SaveFormat: jest.requireActual('expo-image-manipulator').SaveFormat,
|
||||
}))
|
||||
|
||||
jest.mock('@segment/analytics-react-native', () => ({
|
||||
|
||||
Reference in New Issue
Block a user