In addition to low-level tools for stubbing and mocking and high-level tools to integrate with test runners, Sinon provides a few useful utilities. This post explains the first of these, which is fake timers and Dates. Testing time Client-side JavaScript frequently utilizes setTimeout, clearTimeout, setInterval and clearInterval to defer execution. When testing code that depends on these functions