Add specs to test if issue #655 is present: the handler of an interval cannot successfully clear the same interval that generated it's invocation. The most direct test consist in setting an interval with a handler that calls clearInterval over that same interval and make the clock tick for double of it's period. If the issue is present the interval's handler will be called twice. If the issue is not present, the first invocation of the handler will avoid a second one (because of the clearInterval). Another test is included in order to check if recurring scheduled functions are rescheduled before being called. Doing this in the reverse order is the exact cause of the issue.
7.0 KiB
7.0 KiB