Jest has detected the following {number} open handles potentially keeping Jest from exiting: in version 27
See original GitHub issue💥 Regression Report
Last working version
Worked up to version: 26.4.2
Stopped working in version: 27.0.6
To Reproduce
Steps to reproduce the behavior:
clone the repo git@github.com:qunabu/strapi-unit-test-example.git
upgrade jest in package.json from 26.4.2 to 27.0.6
run yarn install
run yarn test
Expected behavior
26.4.2 -> All tests should pass.
27.0.6 -> Jest has detected the following {number} open handles potentially keeping Jest from exiting: The repo use a jest.setTimeout located in ./tests/helpers/strapi.js
Link to repl or repo (highly encouraged)
Run npx envinfo --preset jest
Paste the results here:
System:
OS: Linux 5.12 Fedora 34 (Workstation Edition) 34 (Workstation Edition)
CPU: (8) x64 AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Binaries:
Node: 14.17.0 - /usr/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 6.14.13 - /usr/bin/npm
npmPackages:
jest: ^27.0.6 => 27.0.6
Thank you in advance for your reply.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:7
Top Results From Across the Web
Jest has detected the following 1 open handle potentially ...
I am doing a basic end to end testing here, for the moment it's failing, but first I can't get rid of the...
Read more >How to fix err Jest has detected the following 3 open handles ...
Coding example for the question How to fix err Jest has detected the following 3 open handles potentially keeping Jest from exiting-node.js.
Read more >[NODE-3597] Possible open handle in MongoClient.connect
Jest has detected the following 1 open handle potentially keeping Jest from exiting: ○ TickObject. 7 | async function run() {.
Read more >lodash-es jest - You.com | The AI Search Engine You Control
Jest has detected the following 2 open handles potentially keeping Jest from exiting: ○ PROMISE at Function.resolve (<anonymous>) at Object.
Read more >Using with MongoDB - Jest
With the Global Setup/Teardown and Async Test Environment APIs, Jest can work smoothly with MongoDB.
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
I have the same issue. The problem is, that it is not possible to go back to Jest 26.6.3 after upgrading to Angular 13.
Seems using “jest” version “^27.5.0” or higher solved the problem