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
{{ message }}
This repository was archived by the owner on May 5, 2023. It is now read-only.
We've been narrowing down some memory leaks with jest --detectLeaks which uses the library weak internally. It looks like agent-base is leaking memory every time you require it.
constagent=require("agent-base");describe("agent-base",()=>{it(`should not leak`,async()=>{expect(agent).toBeTruthy();});});
jest --detectLeaks
tests/agent-base.spec.ts
● Test suite failed to run
EXPERIMENTAL FEATURE!
Your test suite is leaking memory. Please ensure all references are cleaned.
There is a number of things that can leak memory:
- Async operations that have not finished (e.g. fs.readFile).
- Timers not properly mocked (e.g. setInterval, setTimeout).
- Keeping references to the global scope.
at node_modules/jest-cli/build/TestScheduler.js:275:22
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.653s