summaryrefslogtreecommitdiff
path: root/test/mock-react-native-image.ts
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-20 21:24:52 +0300
committerKirill Rogovoy <[email protected]>2021-07-20 21:24:52 +0300
commit5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb (patch)
tree273dfc086444533d86d580961c92ba8d14781a67 /test/mock-react-native-image.ts
parentf0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (diff)
WIP
Diffstat (limited to 'test/mock-react-native-image.ts')
-rw-r--r--test/mock-react-native-image.ts20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/mock-react-native-image.ts b/test/mock-react-native-image.ts
deleted file mode 100644
index c01e3ad..0000000
--- a/test/mock-react-native-image.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import * as ReactNative from 'react-native'
-import mockFile from './mock-file'
-
-jest.doMock('react-native', () => {
- // Extend ReactNative
- return Object.setPrototypeOf(
- {
- Image: {
- ...ReactNative.Image,
- resolveAssetSource: jest.fn((source) => mockFile), // eslint-disable-line @typescript-eslint/no-unused-vars
- getSize: jest.fn((
- uri: string, // eslint-disable-line @typescript-eslint/no-unused-vars
- success: (width: number, height: number) => void,
- failure?: (error: any) => void, // eslint-disable-line @typescript-eslint/no-unused-vars
- ) => success(100, 100)),
- },
- },
- ReactNative,
- )
-})