From 5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Tue, 20 Jul 2021 21:24:52 +0300 Subject: WIP --- test/mock-react-native-image.ts | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 test/mock-react-native-image.ts (limited to 'test/mock-react-native-image.ts') 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, - ) -}) -- cgit v1.2.3