mock requestAnimFrame to fix the time test