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

Time is not calculated correctly when using a fake clock #128

Closed
SamVerschueren opened this issue Nov 4, 2015 · 5 comments
Closed

Time is not calculated correctly when using a fake clock #128

SamVerschueren opened this issue Nov 4, 2015 · 5 comments

Comments

@SamVerschueren
Copy link
Contributor

I use sinonjs for stubbing and stuff. But also to use a fake timer that I can manipulate.

When doing this, times are not calculated correctly.

screen shot 2015-11-04 at 14 51 42

Will have a look at it myself, not sure when though.

@sindresorhus
Copy link
Member

Everything can be overridden, though. We'll have to save references to every single global with properties if we're going to be able to totally fix this. Crazy idea, maybe we should?

@vadimdemedes
Copy link
Contributor

@SamVerschueren Could you please create a minimal reproducible example and publish it as a gist?

@SamVerschueren
Copy link
Contributor Author

Sure, here you go.

https://gist.github.com/SamVerschueren/ec24a03117021ed561fb

This results in the following output

screen shot 2015-11-05 at 13 29 53

@vadimdemedes
Copy link
Contributor

Awesome, thank you.

@SamVerschueren
Copy link
Contributor Author

Awesome!

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

No branches or pull requests

3 participants