Version
27.3.1
Steps to reproduce
see repro repo: https://github.com/rburgst/fastify-jest-timers
run
Watch that the tests time out after 5s. The problem goes away when I remove jest.useFakeTimers().setSystemTime(...)
Expected behavior
the test should pass the same as without jest.useFakeTimers().setSystemTime(...)
Actual behavior
tests time out
Additional context
in fastify/help#555 they claim this is due to jest creating a "different environment" from node.js.
Environment
System:
OS: macOS 12.0.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Binaries:
Node: 14.15.5 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
npmPackages:
jest: ^27.3.1 => 27.3.1