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)
It's a false positive: https://github.com/facebook/jest/issues/6423#issuecomment-620407580
@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.
Most helpful comment
@szmarczak how to fix it? I have the same problem when run jest.