Testing own methods that depends on time

I have mocks like this

This is a testify mock of my own funtion HandleActive, I want to simulate that it returns a cancel error after some time. The problem is it doesn’t seem to use temporals own smart “skip time” thingy. Is there some way to handle this ?

Instead of After(...).Return you can mock result through a function that internally calls workflow.Sleep.

1 Like

ah ofc, ty