Got: Jest shows a warning after updating got 11.5.1 -> 11.5.2

Created on 7 Aug 2020  ·  3Comments  ·  Source: sindresorhus/got

Describe the bug

I just update got from 11.5.1 to 11.5.2, after running my tests, jest shows this warning:

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

  ●  DNSCHANNEL

      at new CacheableLookup (node_modules/cacheable-lookup/source/index.js:75:14)
      at Object.<anonymous> (node_modules/got/dist/source/core/index.js:29:24)
      at Object.<anonymous> (node_modules/got/dist/source/as-promise/types.js:16:16)
  • Node.js version: 14.7.0
  • OS & version: ElementaryOS Hera 5.1

Checklist

  • [x] I have read the documentation.
  • [x] I have tried my code with the latest version of Node.js and Got.

Most helpful comment

@szmarczak how to fix it? I have the same problem when run jest.

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

  ●  DNSCHANNEL

      at new CacheableLookup (../../node_modules/cacheable-lookup/source/index.js:75:14)
      at Object.<anonymous> (../../node_modules/got/dist/source/core/index.js:32:24)
      at Object.<anonymous> (../../node_modules/got/dist/source/as-promise/types.js:14:16)

All 3 comments

@szmarczak how to fix it? I have the same problem when run jest.

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

  ●  DNSCHANNEL

      at new CacheableLookup (../../node_modules/cacheable-lookup/source/index.js:75:14)
      at Object.<anonymous> (../../node_modules/got/dist/source/core/index.js:32:24)
      at Object.<anonymous> (../../node_modules/got/dist/source/as-promise/types.js:14:16)

@heavenkiller2018 I'm facing the same issue. @szmarczak's link shows it is a false positive.

My guess is that jest will eventually provide a fix. For now you can just use the --forceExit parameter when you run jest to force it to close.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

astoilkov picture astoilkov  ·  3Comments

jamestalmage picture jamestalmage  ·  3Comments

khizarsonu picture khizarsonu  ·  3Comments

tkoelpin picture tkoelpin  ·  3Comments

dominusmars picture dominusmars  ·  3Comments