question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`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:closed
  • Created 4 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jeysalcommented, Nov 11, 2019

Go for it! 😃

0reactions
github-actions[bot]commented, May 11, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found