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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
jest-fake-timers
breaks util.promisify(setTimeout)
#9150
Comments
Sure https://codesandbox.io/s/determined-chandrasekhar-jfey6?fontsize=14 |
Confirmed that |
Ah, I just tested with node. But yeah, util.promisify won't work for the timer in jsdom |
@GeorgeBekh that should clarify for your case, see docs on how to use different test environments. We could change this issue to be about |
Thanks I've forgot, about the |
util.promisify(setTimeout)
jest-fake-timers
breaks util.promisify(setTimeout)
updated title/description :) |
Is there some assign already? I would like to take a look at this. |
Go for it! :) |
Fixing it for Lolex at the same time would be lovely, if you're up for it 馃檪 Jest will be using Lolex as fake timer implementation as default in v26 EDIT: never mind, there's an open PR for Lolex already! sinonjs/fake-timers#227 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
馃悰 Bug Report
Jest breaks
util.promisify(setTimeout)
functionality when using fake timers.When running code with
jest-fake-timers
it doesn't have the fieldsetTimeout[util.promisify.custom]
, even injest-environment-node
(jest-environment-jsdom
correctly doesn't have it).(Updated description to refer to the specific
jest-fake-timers
problem)envinfo
System: OS: Linux 4.19 Netrunner 19.08 (Indigo) CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz Binaries: Node: 12.12.0 - /bin/node npm: 6.12.0 - /bin/npm npmPackages: jest: ^24.9.0 => 24.9.0
The text was updated successfully, but these errors were encountered: