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
suggestion: mock performance.now()
in FakeTime
#4552
Comments
Are you able to elaborate on your use case? |
performance.now()
performance.now()
in FakeTime
My use case is that I'm using I was trying to write tests for code that was using |
Let's consider your use case. Is its purpose to measure durations between multiple points in time? Does it need the higher precision of |
In this case specifically I'm using Aside from the higher precision, |
|
Also higher precision time is disabled by default, and its usage is generally discouraged because of the security issues. I think there's no particular reason to encourage the use of |
I looked some more into this and it seems like the precision of As for discouraging/encouraging the use of
Although I agree including |
If the point of |
Is your feature request related to a problem? Please describe.
The
FakeTime
class only seems to mock things such asDate.now()
.Describe the solution you'd like
To have it also mock
performance.now()
.Describe alternatives you've considered
I'm just mocking it myself right now but it's not pretty.
The text was updated successfully, but these errors were encountered: