jest icon indicating copy to clipboard operation
jest copied to clipboard

[Bug]: faketimers not restore when use resetAllMocks and restoreAllMocks

Open lmk123 opened this issue 3 years ago • 6 comments

Version

28.0.3

Steps to reproduce

  1. Clone my repo at https://github.com/lmk123/jest-faketimers-bug
  2. npm install
  3. npm run test
  4. 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

lmk123 avatar May 03 '22 17:05 lmk123

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.

github-actions[bot] avatar Jun 02 '22 17:06 github-actions[bot]

check

lmk123 avatar Jun 03 '22 02:06 lmk123

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.

github-actions[bot] avatar Jul 03 '22 03:07 github-actions[bot]

check

lmk123 avatar Jul 03 '22 03:07 lmk123

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.

github-actions[bot] avatar Aug 02 '22 04:08 github-actions[bot]

check

lmk123 avatar Aug 02 '22 05:08 lmk123

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.

github-actions[bot] avatar Sep 01 '22 05:09 github-actions[bot]

check

lmk123 avatar Sep 01 '22 09:09 lmk123

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.

github-actions[bot] avatar Oct 01 '22 10:10 github-actions[bot]

check

lmk123 avatar Oct 01 '22 10:10 lmk123

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.

github-actions[bot] avatar Oct 31 '22 10:10 github-actions[bot]

check

lmk123 avatar Oct 31 '22 11:10 lmk123

İpm start

muratkorkmaz106 avatar Oct 31 '22 14:10 muratkorkmaz106

Npm instal

muratkorkmaz106 avatar Oct 31 '22 14:10 muratkorkmaz106

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.

github-actions[bot] avatar Nov 30 '22 14:11 github-actions[bot]

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.

github-actions[bot] avatar Dec 30 '22 15:12 github-actions[bot]

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.

github-actions[bot] avatar Jan 30 '23 02:01 github-actions[bot]

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.

github-actions[bot] avatar Mar 22 '23 02:03 github-actions[bot]

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.

github-actions[bot] avatar Apr 22 '23 09:04 github-actions[bot]

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.

github-actions[bot] avatar May 22 '23 10:05 github-actions[bot]

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.

github-actions[bot] avatar Jun 21 '23 11:06 github-actions[bot]

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.

github-actions[bot] avatar Jul 22 '23 00:07 github-actions[bot]