aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/__tests__/ducks/tutils.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/__tests__/ducks/tutils.js')
-rw-r--r--web/src/js/__tests__/ducks/tutils.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/src/js/__tests__/ducks/tutils.js b/web/src/js/__tests__/ducks/tutils.js
new file mode 100644
index 00000000..90a21b78
--- /dev/null
+++ b/web/src/js/__tests__/ducks/tutils.js
@@ -0,0 +1,12 @@
+jest.unmock('redux')
+jest.unmock('redux-thunk')
+
+import { combineReducers, applyMiddleware, createStore as createReduxStore } from 'redux'
+import thunk from 'redux-thunk'
+
+export function createStore(parts) {
+ return createReduxStore(
+ combineReducers(parts),
+ applyMiddleware(...[thunk])
+ )
+}