From 773fc8ec3cc4995b74d65358388b6ac399cfec7e Mon Sep 17 00:00:00 2001 From: VickyStash Date: Wed, 31 Jan 2024 13:00:57 +0100 Subject: [PATCH 1/2] [TS migration] Migrate 'react-native-pdf.js' mock --- __mocks__/react-native-pdf.js | 4 ---- __mocks__/react-native-pdf.ts | 11 +++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 __mocks__/react-native-pdf.js create mode 100644 __mocks__/react-native-pdf.ts diff --git a/__mocks__/react-native-pdf.js b/__mocks__/react-native-pdf.js deleted file mode 100644 index 4d179e730903..000000000000 --- a/__mocks__/react-native-pdf.js +++ /dev/null @@ -1,4 +0,0 @@ -export default { - DocumentDir: jest.fn(), - ImageCache: jest.fn(), -}; diff --git a/__mocks__/react-native-pdf.ts b/__mocks__/react-native-pdf.ts new file mode 100644 index 000000000000..00196c9818d0 --- /dev/null +++ b/__mocks__/react-native-pdf.ts @@ -0,0 +1,11 @@ +type ReactNativePdfMock = { + DocumentDir: jest.Mock; + ImageCache: jest.Mock; +}; + +const reactNativePdfMock: ReactNativePdfMock = { + DocumentDir: jest.fn(), + ImageCache: jest.fn(), +}; + +export default reactNativePdfMock; From f8ce4a3abef6e60555fc645af075476e0113bddf Mon Sep 17 00:00:00 2001 From: VickyStash Date: Wed, 31 Jan 2024 16:22:48 +0100 Subject: [PATCH 2/2] Remove unused react-native-pdf mock file --- __mocks__/react-native-pdf.ts | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 __mocks__/react-native-pdf.ts diff --git a/__mocks__/react-native-pdf.ts b/__mocks__/react-native-pdf.ts deleted file mode 100644 index 00196c9818d0..000000000000 --- a/__mocks__/react-native-pdf.ts +++ /dev/null @@ -1,11 +0,0 @@ -type ReactNativePdfMock = { - DocumentDir: jest.Mock; - ImageCache: jest.Mock; -}; - -const reactNativePdfMock: ReactNativePdfMock = { - DocumentDir: jest.fn(), - ImageCache: jest.fn(), -}; - -export default reactNativePdfMock;