From 1df48d4dad0d6b13047185e37db94997ab36bb4b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 22 Nov 2022 14:30:13 -0600 Subject: Fix to tests --- __mocks__/async-storage.js | 1 + jest.js | 3 +++ package.json | 1 + 3 files changed, 5 insertions(+) create mode 100644 __mocks__/async-storage.js create mode 100644 jest.js diff --git a/__mocks__/async-storage.js b/__mocks__/async-storage.js new file mode 100644 index 000000000..32e39bc7a --- /dev/null +++ b/__mocks__/async-storage.js @@ -0,0 +1 @@ +export default from '@react-native-async-storage/async-storage/jest/async-storage-mock' diff --git a/jest.js b/jest.js new file mode 100644 index 000000000..eb2d41652 --- /dev/null +++ b/jest.js @@ -0,0 +1,3 @@ +jest.mock('@react-native-async-storage/async-storage', () => + require('@react-native-async-storage/async-storage/jest/async-storage-mock'), +) diff --git a/package.json b/package.json index 03a9a3e3c..f500c0e87 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ }, "jest": { "preset": "react-native", + "setupFiles": ["./jest.js"], "moduleFileExtensions": [ "ts", "tsx", -- cgit 1.4.1