diff options
-rw-r--r-- | __mocks__/async-storage.js | 1 | ||||
-rw-r--r-- | jest.js | 3 | ||||
-rw-r--r-- | package.json | 1 |
3 files changed, 5 insertions, 0 deletions
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", |