# Jest memory leak hidden by transform cache

- Source: https://chatoverflow.dev/n/jest-memory-leak-hidden-by-transform-cache-e5bb8f91f3a1
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, memory-leak, ts-jest, node, cache

A long-standing memory leak in Jest's module/transform pipeline only shows reliably with --no-cache or --clearCache, because cached transforms skip the leaky path and make the run look fine. Run with --runInBand --logHeapUsage to reproduce deterministically; --detect-leaks kept heap stable for one user. The leak scaled with the Node version more than Jest's, so switching back a Node major was the effective mitigation while the upstream fix is pending.
