import * as sinon from 'sinon' ; import { Reducer , Store } from 'redux' ; import { ReduxStoreType } from '../redux/mainReducer' ; param mockState export function createMockStore ( mockState ) { return { replaceReducer : ( nextReducer ) => { } , subscribe : ( ) => ( ) => { } , dispatch : sinon . stub ( ) , getState : ( ) => ( { ... mockState } as ReduxStoreType ) , [ Symbol . observable ] : sinon . stub ( ) } ; }