-
Notifications
You must be signed in to change notification settings - Fork 108
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 travel without freezing #85
Comments
I don't see how this could be implemented without async behaviour, which means you just might as well just put |
We can take a timestamp of when time travel starts and then compute the difference to determine the adjust "current" time. Timecop.js does this: https://github.com/jamesarosen/Timecop.js/blob/master/lib/TimeStackItem.js |
True, just computing the |
Will see what I can do. |
Has this issue stalled? |
Will be closed by #102 |
closed by #102 |
I'd like to use this library for acceptance tests (ie. running the web app + JS frontend in a browser / phantomjs) that involve time-dependent data, so the clock needs to be set back to a certain date. My app also uses lodash'
debounce
function, however, which relies on the passage of time. Because I don't really have a good place to put atick
statement the clock shouldn't be 'frozen' at a particular moment but it should advance as normal from the system date specified.This would like the
travel
method of Timecop.js (which is deprecated in favor of sinon / lolex.)The text was updated successfully, but these errors were encountered: