diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-05-16 06:07:38 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-05-16 06:07:38 +0800 |
commit | 4b341e6a955d1fa71decfb021a86e7da09a933b0 (patch) | |
tree | 58cfc349cb806f843ab88338ea41fea3e17d2c5a /test/lib | |
parent | c4be4c7195c05936fba61783b9f8a3c96d161ce0 (diff) | |
download | tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.gz tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.bz2 tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.lz tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.xz tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.zst tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.zip |
Got test failing nearly correctly
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/mock-store.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lib/mock-store.js b/test/lib/mock-store.js new file mode 100644 index 000000000..4714c3485 --- /dev/null +++ b/test/lib/mock-store.js @@ -0,0 +1,18 @@ +const createStore = require('redux').createStore +const applyMiddleware = require('redux').applyMiddleware +const thunkMiddleware = require('redux-thunk') +const createLogger = require('redux-logger') +const rootReducer = function() {} + +module.exports = configureStore + +const loggerMiddleware = createLogger() + +const createStoreWithMiddleware = applyMiddleware( + thunkMiddleware, + loggerMiddleware +)(createStore) + +function configureStore (initialState) { + return createStoreWithMiddleware(rootReducer, initialState) +} |