`jest-fake-timers` breaks `util.promisify(setTimeout)`
See original GitHub issue🐛 Bug Report
Jest breaks util.promisify(setTimeout)
functionality when using fake timers.
When running code with jest-fake-timers
it doesn’t have the field setTimeout[util.promisify.custom]
, even in jest-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
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Jest doesn't work with util.promisify(setTimeout) - Stack Overflow
My web app has a route with a handler that uses util.promisify(setTimeout) so the fact that Jest falls on its face trying to...
Read more >@jest/fake-timers | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Timer Mocks - Jest
This is replacing the original implementation of setTimeout() and other timer functions. Timers can be restored to their normal behavior with ...
Read more >API | React Native Testing Library - Open Source
This can also be used to build test utils that would normally require to be ... will just return Promise that will be...
Read more >Attribution - Sandtime.io
Attribution. The following sets forth attribution notices for third party software that may be contained in portions of the Sandtime.io application and its ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Go for it! 😃
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. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.