-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timestamp to AnimationFrame #453
Conversation
Please update the tests, otherwise it looks good 👍 |
Ah, I forgot to mention that. Hard to think while holding a squirmy child... I wasn't sure how to test the timestamps, given that the argument is non-deterministic. In other tools, I'd use a mock or stub tool, or something like timecop to guarantee consistent results. I looked through the source for some way to mock it and/or make a strict timestamp result, and I couldn't find anything. Do you have a suggestion? |
@bbugh I'd change the tests to assert that the passed argument is greater than |
There does not seem to be an assertion for greater than, and I don't see one for not equal, or any negation at all. I will make another issue for this. |
Added discussion #458 |
@gdotdesign thanks for the updates! It's useful to see how you would write those tests, as the resident Mint expert. ;) @Sija in case you didn't notice, the changes you've requested were put in by @gdotdesign's commits, so I'm unsure if I should accept the suggestions. |
@bbugh I haven't, sorry :D I still believe though we should split those. |
This adds the expected
Number
argument fromrequestAnimationFrame
so that consumers can calculate the time step difference, etc.Fixes #445