How to test Async Storage with Jest?

Posted by Editorial Staff | Updated on

If you want to test Async Storage with Jest? My original answer just pointed at how the author of react-native-simple-store had dealt with the mocking. I’ve updated my answer with my own mocking that removes Jason’s hard-coded mock responses.

Here is mock example:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers