1.0.1 • Published 7 years ago

asyncstorage-mock-another v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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

1.0.1

7 years ago

1.0.0

7 years ago