Jest integration docs not fixing [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null
.
#566
-
Current behaviorRunning jest still resulting in Verisons
I've tried the error steps here several times, including cleaning all build folders, rebooting afterwords but haven't had any success
I've tried following the integration steps here without any luck. Tried implementation via /mocks/@react-native-community/async-storage.js
and jest.config.js
jest.setup.js
but I still get the same error:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hey, Your mock folder should be in top level (where you have |
Beta Was this translation helpful? Give feedback.
-
Sorry, I made a typo in the issue. I did have the folder named |
Beta Was this translation helpful? Give feedback.
-
You should create a folder named |
Beta Was this translation helpful? Give feedback.
You should create a folder named
@react-native-async-storage
instead of@react-native-community
. Mocking is not unique to AsyncStorage, it is a feature of Jest. You can read more about mocks here: https://jestjs.io/docs/manual-mocks.