asyncstorage-mock-another

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i asyncstorage-mock-another

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • staltz