jfairbank / redux-saga-test-plan

Test Redux Saga with an easy plan.
http://redux-saga-test-plan.jeremyfairbank.com
MIT License
1.25k stars 127 forks source link

select effect does not allow args #383

Open miestr opened 2 years ago

miestr commented 2 years ago

Redux saga is capable of handling selectors that take additional arguments, f.e. mySelectorFn: (state, itemId) => state.content.map[itemId]

Whereas testSaga.select notation only accepts selector of type ((state) => any, args)

meaning that I can not write a mock efffect like testSaga.select(mySelectorFn, 5).next(somePieceOfState)

Is there a way to pass this additional parameter into the effect?