You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom effect called takeLeadingPerKey() which is based off of takeLeading() but allows multiple sagas to run as long as they have a unique key.
I'm not sure how to use it with testSaga()
Example code:
/** * takeLeadingPerKey() signature: * function takeLeadingPerKey(patternOrChannel, worker, keySelector, ...args) */function*doSomething(action){// Do something}functionselectKey(action){returnaction.meta.key;}exportfunction*mySaga(){yieldtakeLeadingPerKey('MY_TYPE',doSomething,selectKey);}
I have a custom effect called
takeLeadingPerKey()
which is based off oftakeLeading()
but allows multiple sagas to run as long as they have a unique key.I'm not sure how to use it with
testSaga()
Example code:
Example test:
With the above, I get:
Obviously it's complaining that
takeLeadingPerKey()
doesn't exist withtestSaga()
, so is there another way to test this?The text was updated successfully, but these errors were encountered: