Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest has detected open handle JSSTREAM http2-wrapper #2288

Open
2 tasks done
garrettg123 opened this issue Aug 1, 2023 · 1 comment
Open
2 tasks done

Jest has detected open handle JSSTREAM http2-wrapper #2288

garrettg123 opened this issue Aug 1, 2023 · 1 comment

Comments

@garrettg123
Copy link

Describe the bug

  • Node.js version: 18.16.1
  • OS & version: Mac 13.4.1

Running Jest after switching to ESM shows the error below. "got" is the only package I have that uses http2-wrapper, so it seems like the prime suspect. I will do more research on how to properly mock it or close it as I'm sure there is an easy fix but I couldn't find it in the existing issues.

Actual behavior

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  JSSTREAM

      at Object.<anonymous> (../node_modules/http2-wrapper/source/utils/js-stream-socket.js:6:25)
      at Object.<anonymous> (../node_modules/http2-wrapper/source/proxies/h1-over-h2.js:5:24)
      at Object.<anonymous> (../node_modules/http2-wrapper/source/index.js:13:5)

Expected behavior

No open handles

Code to reproduce

yarn node --loader ts-node/esm/transpile-only --experimental-vm-modules $(yarn bin jest) --config jest.config.js --verbose --detectOpenHandles

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
@kevinlul
Copy link

Is this a duplicate of #1516?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants