jest
jest copied to clipboard
[Bug]: --workerIdleMemoryLimit doesn't work with --maxWorkers 1
Version
29.3.1
Steps to reproduce
Run a bunch of tests with --maxWorkers 1 --workerIdleMemoryLimit 1kb --logHeapUsage. Memory usage will go up way beyond 1kb.
Expected behavior
I expect the worker to be restarted after every test with a low worker idle memory limit. Obviously this doesn't work with --runInBand but with --maxWorkers 1 it should!
Actual behavior
The worker is never restarted.
Additional context
It looks like #13168 and/or #13171 were proposed to fix this, but neither was merged.
Environment
System:
OS: macOS 13.1
CPU: (10) x64 Apple M1 Max
Binaries:
Node: 16.17.1 - /nix/store/fyaisfdhkviz6sb628qxlmy5wcasqfhq-nodejs-16.17.1/bin/node
npm: 8.12.1 - ~/.local/bin/npm
npmPackages:
jest: 29.3.1 => 29.3.1
(also in our CI env which is linux on CircleCI)