Hello,
I’m using MockActivityEnvironment
from @temporal/test
to write tests against activities. Is it possible to skip time when an activity sleeps using await Context.current().sleep(..)
?
Thanks!
Hello,
I’m using MockActivityEnvironment
from @temporal/test
to write tests against activities. Is it possible to skip time when an activity sleeps using await Context.current().sleep(..)
?
Thanks!
Hi,
It’s possible by overriding the sleep method on MockActivityEnvironment.context
or mocking setTimeout
which is used internally.
Good idea, overriding MockActivityEnvironment.context.sleep
worked, thanks!