Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mock-async-storage

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-async-storage - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

lib/mockAsyncStorage.js

@@ -44,3 +44,3 @@ 'use strict';

return _asyncToGenerator(function* () {
const val = _this.store.get(k);
const val = _this.store.get(k) || null;
if (cb) cb(null, val);

@@ -47,0 +47,0 @@ return val;

{
"name": "mock-async-storage",
"title": "Jest Mock AsyncStorage for react-native",
"version": "2.0.3",
"version": "2.0.4",
"description": "Its a mock of react-native AsyncStorage for jest tests",

@@ -92,3 +92,4 @@ "main": "lib/index.js",

"Alexis Mangin (http://www.alexismangin.com/)",
"Kees Kluskens (http://webduck.nl)"
"Kees Kluskens (http://webduck.nl)",
"Caleb Gregory (http://caleb-gregory.com)"
],

@@ -95,0 +96,0 @@ "bugs": {

@@ -19,2 +19,7 @@ /* eslint-env jest */

it('#getItem returns null if item not in store', async () => {
const foo = await storage.getItem('baz')
expect(foo).toEqual(null)
})
it('#removeItem', async () => {

@@ -21,0 +26,0 @@ await storage.removeItem('foo')

@@ -40,3 +40,3 @@ // @flow

async getItem (k: K, cb: ?ErrBack<V>): Promise<?V> {
const val = this.store.get(k)
const val = this.store.get(k) || null
if (cb) cb(null, val)

@@ -43,0 +43,0 @@ return val

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc