cjohansen/Sinon.JS — pull request #311 by IanLewis (2013-08-03 03:59:41+00:00)
Title: Fixed problem with chained timers with delay=0

There was an issue with the firstTimerInRange() method where timers that did not have the smallest delay (callAt) were returned when some timeouts had a delay of zero. Specifically, if the "smallest" variable was zero, then the next callback was processed regardless of whether that timeout's callAt was less than zero or not. This caused some timeouts to be skipped entirely when the tick() method was called.