Open robfletcher opened 10 years ago
That is exactly right. Currently, if you want to wait on an activity, it needs to return something.
Flow, handles this by generating method signatures that return Promise
ok, I was hoping it would pick up Promise<Void>
but it's not a big deal for me to return something.
If I have an activity method declared as
void
there seems to be no way to make its promise complete in a unit test.For example if I have a test like:
That is testing:
Then
activities.step2()
is never called in the unit test. If I simply change the method definition to return any type – sayboolean
– and make the mock expectation return something using>> true
then both activity methods do get executed.Maybe I'm misunderstanding how this is supposed to work.