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
If you take a heap snapshot at the end of the test you'll see that the garbage collector is not removing the the imported modules at the end of a test suite.
Additional context
A heap snapshot at the end of the tests does indeed show duplicate imports. The repository I provided is a minimal example: if you remove one of the imports, Jest no longer detects any memory leaks.
This issue occurred to me with the aws-sdk libraries, but it might not be strictly related to them. I could not pinpoint what specific characteristic of the aws-sdk libraries causes this.
Version
29.7.0
Steps to reproduce
npm install
npm test -- --detectLeaks
Expected behavior
It should not detect any leak
Actual behavior
If you take a heap snapshot at the end of the test you'll see that the garbage collector is not removing the the imported modules at the end of a test suite.
Additional context
A heap snapshot at the end of the tests does indeed show duplicate imports. The repository I provided is a minimal example: if you remove one of the imports, Jest no longer detects any memory leaks.
This issue occurred to me with the aws-sdk libraries, but it might not be strictly related to them. I could not pinpoint what specific characteristic of the aws-sdk libraries causes this.
Environment
The text was updated successfully, but these errors were encountered: