aboutsummaryrefslogblamecommitdiffstats
path: root/test/lib/mock-store.js
blob: 8af8f6d237f39c8f42d81bd29127f1968293df60 (plain) (tree)
1
2
3
4
5

                                                        

                                                         
                                  












                                                             
const createStore = require('redux').createStore
const applyMiddleware = require('redux').applyMiddleware
const thunkMiddleware = require('redux-thunk').default
const createLogger = require('redux-logger').createLogger
const rootReducer = function () {}

module.exports = configureStore

const loggerMiddleware = createLogger()

const createStoreWithMiddleware = applyMiddleware(
  thunkMiddleware,
  loggerMiddleware
)(createStore)

function configureStore (initialState) {
  return createStoreWithMiddleware(rootReducer, initialState)
}