Mid 2014, I published a post about a timing service. You can read the post here.
Recently, I wanted to use this service for a client but the requirements meant that I had to refactor the code to be more robust.
Mid 2014, I published a post about a timing service. You can read the post here.
Recently, I wanted to use this service for a client but the requirements meant that I had to refactor the code to be more robust.
Suppose you have a service that you want to test.
And let’s also suppose that this service has a method that throws an Error under some scenario.
How would you test this?
Every once in a while, I find myself in need of a timing mechanism. Something that will handle timing and scheduling, and allow me to hook with a custom functionality every interval.
Some uses can be, for example, a clock counting down or simply showing the time passing by, polling the server back-end for new data, etc. Basically, anything that needs to happen every given interval.