tp / tsaga

Typesafe and lightweight way to write Redux-connected functions with asynchronous side-effects that are easily testable.
Apache License 2.0
8 stars 1 forks source link

Allow providing `dispatches` assertion #17

Closed tp closed 5 years ago

tp commented 5 years ago

Required to test the case where sagas dispatch an action to trigger another watcher.

(Though, unless the same action also updates the state, it might be better to spawn/fork the other saga, which makes the invocation guaranteed and the connection explicit (also allowing CMD/CTRL + click).)

tp commented 5 years ago

Since only one saga is active (and it's unlikely to call itself) it can just function as an assertion (there is no need to "swallow" the dispatch).