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

When shouldAdvanceTime: true and doing some synchronous work, time should still pass #422

Closed
rluvaton opened this issue Feb 13, 2022 · 1 comment

Comments

@rluvaton
Copy link

rluvaton commented Feb 13, 2022

We understand you have a problem and are in a hurry, but please provide us with some info to make it much more likely for your issue to be understood, worked on and resolved quickly.

  • FakeTimers version : 9.1.0
  • Environment : macOS Moterey 12.2.1
  • Example URL :
  • Other libraries you are using: tap

What did you expect to happen?

Time should still pass even when doing synchronous work

What actually happens
time is not updating

How to reproduce

Added test case in #423

@rluvaton
Copy link
Author

Never mind:

Please note that this is achieved using the original setImmediate() API

It stated at the docs how it's implemented which means setImmediate won't be called when sync code is running because of how the event loop works...

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

1 participant