cron
cron copied to clipboard
Add Time Mocking
This PR adds a WithClock()
option, which uses mixer/clock to simulate the passage of time. Tests can be written to, for example, verify the behavior of a given schedule.
This comes in handy for me personally as I'd like to test the interaction of a cron with my own service, over a long period of time.
+1, @robfig would you be interested in merging this?
+1.
Without mockable clock unit tests are ugly.
+1. Without mockable clock unit tests are ugly.
+10086