-
Notifications
You must be signed in to change notification settings - Fork 476
Linking when using kotlin not possible? NativeModule.RCTAsyncStorage is null. #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I answered your post on stackoverflow. Also see our repo if you like. |
@rpuls Hey, thanks for reaching out. I'm on the way of writing mocks to be used with Jest. I'm aiming to finish in few days, alongside with docs explaining how to test it. For now, to get by this error, you'd have to mock Also, about linking with Kotlin - this is more a question to CLI team, as it involves linking a module. |
Hey thanks for replying! I found a solution that worked. Tried many different ways of mocking the AsyncStorage. 4th attempt worked like a charm. I updated my stackoverflow with the solution https://stackoverflow.com/questions/55418910/jest-test-fails-after-installing-react-native-async-storage/55421364 |
v1.3.0 released, please check it out 🙏 |
You want to:
Since I was getting warnings that the react-native asyncStorags is becomming deprecated and is moved (here) to individual package, I decided to install... This seems to be a pain in the a** every time, was also troubleful when I installed RCs' extracted WebView. (grumpy sorry)....
Anyway, this time I am stuck with failing jest tests that I have not been able to resolve after 24 hours of trying. Have had multiple colleges passing by as well as asked for help on SO.
Please check this link for further issue despription: https://stackoverflow.com/questions/55418910/jest-test-fails-after-installing-react-native-async-storage
I did manual linking since
react-native link
will not work for this module as MainApplication.java does not exist when using kotlin. Instead I have MainApplication.ktAfter linking manually the async functions are working just fine. Except the jest test are unable to find the module.
@RNCommunity/AsyncStorage: NativeModule.RCTAsyncStorage is null.
Any suggestions?
The text was updated successfully, but these errors were encountered: