1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00
metamask-extension/test/lib/mock-store.js

19 lines
458 B
JavaScript
Raw Normal View History

import { applyMiddleware, createStore } from 'redux'
import thunkMiddleware from 'redux-thunk'
import { createLogger } from 'redux-logger'
2017-05-28 20:18:07 +02:00
const rootReducer = function () {}
2017-05-16 00:07:38 +02:00
export default configureStore
2017-05-16 00:07:38 +02:00
const loggerMiddleware = createLogger()
const createStoreWithMiddleware = applyMiddleware(
thunkMiddleware,
loggerMiddleware
)(createStore)
function configureStore (initialState) {
return createStoreWithMiddleware(rootReducer, initialState)
}