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 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:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:7

github_iconTop GitHub Comments

5reactions
MiNickelcommented, Jan 4, 2022

Hi. You can update until 26.6.3, versions >= 27.0.0 cause this error.

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.

0reactions
Kazdan1994commented, Nov 26, 2022

Seems using “jest” version “^27.5.0” or higher solved the problem

image

Read more comments on GitHub >

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

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