[email protected][email protected]With above versions of node, jest, and nock, this sometimes happens:
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)
This change is causing the dns cache to always be created even when dnsCache is not true, and it never shuts down:
Fix dnsCache: true having no effect: https://github.com/sindresorhus/got/commit/043c9501b85172e09819d44ac8eb49c574b27bda
new CacheableLookup(); when options.dnsCache === true. Maybe use mem to memoize it so it's not re-generated on every call.https://github.com/facebook/jest/issues/6423
It doesn't prevent the process from exiting. If it did then our tests would time out. This is definitely a bug in Jest.
You can simply test it via:
node -e "new (require('dns').Resolver)().resolve4('google.com', console.log)"
Also this is a duplicate of #1397
Thanks for the quick reply @szmarczak! Sorry to take your time!
No problem. Let me know if there are any other issues :)
Also I think you can disable that check in Jest as a workaround.
I have the same problem:
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)
Same for me.
There's nothing we can do. Locking.
Most helpful comment
I have the same problem: