What β add --max-old-space-size=8192 to the test and test:unit npm scripts so large unit-test suites stop crashing with a V8 heap-allocation failure.
Scope β jest with --experimental-vm-modules leaks ESM module registries between suites (upstream jest issue, still present on jest 30): measured ~15 MB leaked per suite under --runInBand, linear growth. Node's default old-space ceiling (~4 GB) is hit around ~280 suites β a downstream consumer with a large suite already hit it (OOM, not a test failure; the full suite passes clean at 8192). The :coverage variants already carry their own --max-old-space-size flags and are untouched.
The flag is a ceiling, not a reservation β no cost for small suites. If a suite ever approaches 8 GB, worker recycling (workerIdleMemoryLimit, dropping --runInBand) becomes the structural fix.
Created via /dev:issue
What β add
--max-old-space-size=8192to thetestandtest:unitnpm scripts so large unit-test suites stop crashing with a V8 heap-allocation failure.Scope β jest with
--experimental-vm-modulesleaks ESM module registries between suites (upstream jest issue, still present on jest 30): measured ~15 MB leaked per suite under--runInBand, linear growth. Node's default old-space ceiling (~4 GB) is hit around ~280 suites β a downstream consumer with a large suite already hit it (OOM, not a test failure; the full suite passes clean at 8192). The:coveragevariants already carry their own--max-old-space-sizeflags and are untouched.The flag is a ceiling, not a reservation β no cost for small suites. If a suite ever approaches 8 GB, worker recycling (
workerIdleMemoryLimit, dropping--runInBand) becomes the structural fix.Created via /dev:issue