asyncstorage-mock-another
v1.0.1
Published
Another package to mock the AsyncStorage API from React Native
Downloads
9
Readme
AsyncStorage Mock Another
Another package (there is already asyncstorage-mock) to mock the AsyncStorage API from React Native. This will give you a non-persistent in-memory database based on a simple JavaScript object. Use this package for testing "headless" React Native apps.
Installation
npm install asyncstorage-mock-another
Usage
var AsyncStorage = require('asyncstorage-mock-another')
AsyncStorage.setItem('age', 22, (err1) => {
AsyncStorage.getItem('age', (err2, ageValue) => {
console.log('ageValue', ageValue, 'should be 22')
})
})
License
MIT