Skip to content
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

Fake timers in Sinon doesn't work with performance-now #20

Open
Saegrov opened this issue Oct 19, 2017 · 0 comments · May be fixed by #22
Open

Fake timers in Sinon doesn't work with performance-now #20

Saegrov opened this issue Oct 19, 2017 · 0 comments · May be fixed by #22

Comments

@Saegrov
Copy link

Saegrov commented Oct 19, 2017

We have a use-case where we are using Sinons-fake timers in our unit tests. http://sinonjs.org/releases/v4.0.1/fake-timers/

Sinon (or lolex) hijacks globals like process.hrtime to allow faking time.

Using performance-now with Sinon doesn't work since performance-now keeps a reference to process.hrtime. When Sinon patches the global hrtime, performance-now still keeps a reference to the original hrtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant