Jest: Module caching memory leak

Created on 23 Sep 2020  路  1Comment  路  Source: facebook/jest

馃悰 Bug Report

This is a crosspost of https://github.com/kulshekhar/ts-jest/issues/1967 (Please read through this issue for context)

When transpiling TypeScript with a minimal transformer, there is a significant memory leak.

To Reproduce

Steps to reproduce the behavior:

  1. git clone [email protected]:willsoto/jest-repro.git
  2. git switch jest-memory-leak-custom-transpiler
  3. npm ci
  4. Run any of the test commands

Expected behavior


Modules should be cached once for the duration of the test run or allowed to be garbage collected after the test suite has completed.

Link to repl or repo (highly encouraged)

https://github.com/willsoto/jest-repro (switch to the jest-memory-leak-custom-transpiler branch)

envinfo

  System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.18.3 - ~/.volta/tools/image/node/12.18.3/bin/node
    Yarn: 1.22.4 - ~/.volta/tools/image/yarn/1.22.4/bin/yarn
    npm: 6.14.5 - ~/.volta/tools/image/npm/6.14.5/bin/npm
  npmPackages:
    jest: ^26.4.2 => 26.4.2

cc/ @ahnpnl

Bug Report Needs Repro Needs Triage

Most helpful comment

Bump, we're still hitting this issue across several of our repos

>All comments

Bump, we're still hitting this issue across several of our repos

Was this page helpful?
0 / 5 - 0 ratings