redux-mock-store typing test for MockStore and MockStoreCreator

This commit is contained in:
cwmoo740
2017-06-20 10:36:09 -04:00
parent 5e13d26ae1
commit 85ce02feb3
@@ -1,5 +1,5 @@
import * as Redux from 'redux';
import configureStore from 'redux-mock-store';
import configureStore, { MockStore, MockStoreCreator } from 'redux-mock-store';
// Redux store API tests
// The following test are taken from ../redux/redux-tests.ts
@@ -24,10 +24,10 @@ function loggingMiddleware() {
};
}
const storeMock = configureStore<number>([loggingMiddleware]);
const mockStoreCreator: MockStoreCreator<number> = configureStore<number>([loggingMiddleware]);
const initialState = 0
const store = storeMock(initialState);
const store: MockStore<number> = mockStoreCreator(initialState);
store.subscribe(() => {
// ...