-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support timeout.refresh in node environments #187
Comments
So basically it should do |
Yeah, I think that makes sense. Have to keep around old timeouts as well, but maybe that's done already? Keeping a weak reference might be overkill |
@SimenB do you feel like making a PR? Otherwise - I might have time to take a look at this when I'm back from the Node.js summit. |
This was fixed in #193 🎉 |
The function was added, but it has no logic. Should it? |
@SimenB technically it probably should (even if through just a clearTimeout and setTimeout) - but I doubt anyone is going to use the two features together for some time. I can reopen if you'd like. |
@SimenB I have an existing test that broke when I refactored from clearTimeout()/setTimeout() to Timer.refresh() because the fake Timer.refresh() does not call clearTimeout()/setTimeout(). Any plans to add that logic? |
PR very much welcome 🙂 |
I'll reopen this since we don't actually support it, it's just a noop |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Fixed in #328 , we need a release, it'll be a few days before I'll be in front of a computer with npm credentials. |
What did you expect to happen?
clock.setTimeout(() => {}, 0).refresh
should exist.(as it's not released I didn't really expect that, but y'know.)
See nodejs/node#20298, which is slated to land in 10.2.0.
What actually happens
It's not there
How to reproduce
Create a clock in a node env, call
setTimeout
, observe missingrefresh
function on return value.The text was updated successfully, but these errors were encountered: