[Bug]: faketimers not restore when use resetAllMocks and restoreAllMocks
Version
28.0.3
Steps to reproduce
- Clone my repo at https://github.com/lmk123/jest-faketimers-bug
- npm install
- npm run test
- You should see the error come up
Expected behavior
tests all pass
Actual behavior
the second test time out: Exceeded timeout of 5000 ms for a test.
Additional context
jest v27.5.1 has the same error
Environment
System:
OS: macOS 12.3.1
CPU: (8) arm64 Apple M1
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
npmPackages:
jest: ^28.0.3 => 28.0.3
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
check
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
check
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
check
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
check
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
check
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
check
İpm start
Npm instal
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
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.