fix mock requestAnimationFrame to allow chaining
add teardown to test(L1457)
prevent infinite delay on redraw
Merge pull request #253 from zzmp/fix-redraw-infinite-delay

Fix redraw infinite delay