React native - How to write a unit test for native code as SharedPreferences.

I am developing mobile recording react native, I used "react-native-shared-preferences": "0.0.8"

to save data to share preferences with android device, so when I write a unit test (I used Jest library) and I found the problem, This exception will appear when running the code test. and the code works without a unit test.

How can I solve this? and how can I write a jest unit test for my own code?

+3


source to share





All Articles