I want to write some unit test cases which are using combnereducers()
function. I have something like following.
myReducers1.js
function reducer1(state = {}, action) {
//some logic
}
function reducer2(state = {value1: {}}, action) {
//some logic
}
const appReducer = combineReducers({reducer1, reducer2})
export default appRecuer;
So is there any way to test the code written inside the reducer1
and reducer2
? If there is then how can i reach to the reducer1
and reducer2
function which are inside myReducers1.js
.
I have already gone through to the Testing Redux combined reducers but this is having the different context. So please help me.
Thanks in advance.