1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/test/lib/mock-store.js

19 lines
539 B
JavaScript
Raw Normal View History

2017-05-16 00:07:38 +02:00
const createStore = require('redux').createStore
const applyMiddleware = require('redux').applyMiddleware
2017-09-06 20:04:17 +02:00
const thunkMiddleware = require('redux-thunk').default
const createLogger = require('redux-logger').createLogger
2017-05-28 20:18:07 +02:00
const rootReducer = function () {}
2017-05-16 00:07:38 +02:00
module.exports = configureStore
const loggerMiddleware = createLogger()
const createStoreWithMiddleware = applyMiddleware(
thunkMiddleware,
loggerMiddleware
)(createStore)
function configureStore (initialState) {
return createStoreWithMiddleware(rootReducer, initialState)
}