diff --git a/tests/complete.spec.js b/tests/complete.spec.js index 02d4e209e..5c62ea351 100644 --- a/tests/complete.spec.js +++ b/tests/complete.spec.js @@ -9,7 +9,7 @@ import { combineReducers, createStore } from 'redux' import persistReducer from '../src/persistReducer' import persistStore from '../src/persistStore' -import createWebStorage from '../src/storage/createWebStorage' +import { createMemoryStorage } from 'storage-memory' import { PERSIST, REHYDRATE } from '../src/constants' import sleep from './utils/sleep' @@ -17,7 +17,7 @@ let reducer = () => ({}) const config = { key: 'persist-reducer-test', version: 1, - storage: createWebStorage('local'), + storage: createMemoryStorage(), debug: true, } diff --git a/tests/persistCombineReducers.spec.js b/tests/persistCombineReducers.spec.js index 6a6db28a8..11089d36a 100644 --- a/tests/persistCombineReducers.spec.js +++ b/tests/persistCombineReducers.spec.js @@ -1,13 +1,13 @@ // @flow import persistCombineReducers from '../src/persistCombineReducers' -import createWebStorage from '../src/storage/createWebStorage' +import { createMemoryStorage } from 'storage-memory' import test from 'ava' const config = { key: 'TestConfig', - storage: createWebStorage('local') + storage: createMemoryStorage() } test('persistCombineReducers returns a function', t => { diff --git a/tests/persistReducer.spec.js b/tests/persistReducer.spec.js index 9f1a4177c..d69bf795f 100644 --- a/tests/persistReducer.spec.js +++ b/tests/persistReducer.spec.js @@ -7,7 +7,7 @@ import _ from 'lodash' import configureStore from 'redux-mock-store' import persistReducer from '../src/persistReducer' -import createWebStorage from '../src/storage/createWebStorage' +import { createMemoryStorage } from 'storage-memory' import { PERSIST, REHYDRATE } from '../src/constants' import sleep from './utils/sleep' @@ -16,7 +16,7 @@ let reducer = () => ({}) const config = { key: 'persist-reducer-test', version: 1, - storage: createWebStorage('local') + storage: createMemoryStorage() } test('persistedReducer does not automatically set _persist state', t => { @@ -31,7 +31,6 @@ test('persistedReducer does returns versioned, rehydrate tracked _persist state let register = sinon.spy() let rehydrate = sinon.spy() let state = persistedReducer({}, { type: PERSIST, register, rehydrate }) - console.log('state', state) t.deepEqual({ version: 1, rehydrated: false}, state._persist) })