mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
redux-mock-store typing test for MockStore and MockStoreCreator
This commit is contained in:
@@ -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(() => {
|
||||
// ...
|
||||
|
||||
Reference in New Issue
Block a user