Let's say I have several gear functions and I combine them into one gear using combineReducers(...)
, is there any way to check which gears actually contain a combined gear?
For example, if I have this:
import { combineReducers } from 'redux' const reducer1 = (state, action) => {...} ... (more reducers, etc) const rootReducer = combineReducers({ reducer1, reducer2, reducer3 }) export default rootReducer
Can I write a test with Mocha and Expect.js that will let me check if rootReducer
reducer2
? Is it possible?
The way I am currently configured for my project is that each reducer is in a separate file and then imported into a file where the combineReducers(...)
function is used to combine them. I am testing all individual gearboxes to verify that they are doing what they should, but I also thought it would be nice to check the combined gearbox to make sure that it contains all the other gearboxes that it should (in case I forget add one example).
thanks
source share