You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a memory leak in the node-http adapter when using it with Jest. Jest resets the require cache after each test suite run which causes memory leaks when a native module is monkey patched and not reset; read more here.
The issue with the node-http adapter is caused by the monkey patching of the http and https modules here. These patches are not reset onDisconnect nor does nock reset them when calling restore (related issue).
I opened this PR which resolves the issue by resetting the monkey patching for the http and https modules.
Description
There is a memory leak in the node-http adapter when using it with Jest. Jest resets the require cache after each test suite run which causes memory leaks when a native module is monkey patched and not reset; read more here.
The issue with the node-http adapter is caused by the monkey patching of the http and https modules here. These patches are not reset onDisconnect nor does nock reset them when calling restore (related issue).
I opened this PR which resolves the issue by resetting the monkey patching for the
http
andhttps
modules.Config
Dependencies
Environment
node: 12.18.3
npm: 6.14.6
os: linux 5.4.39-linuxkit
The text was updated successfully, but these errors were encountered: