Skip to content

How to test MsgEffect? #353

Answered by JozefFlakus
sukazavr asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sukazavr!

MessagingTestBed was on its way but I postponed the implementation due to the ongoing process of introducing version 4.0.
So far the scope for the next major release doesn't include it but since it is a non breaking feature it can be added in the next 4.1 version. But directly answering your question...

MsgEffect is just a function. It takes A and returns B. You can write a simple utility function that packs an incoming Event into the stream and then feeds it in. Additionaly the EffectContext can be easily mocked. The only thing that is worth providing is the Context object that you can build using contextFactory function from @marblejs/core and passing it through lookup fun…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sukazavr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants