Skip to content

chore(test): raise the heap ceiling on non-coverage test scripts - #4144

Merged
PierreBrisorgueil merged 2 commits into
masterfrom
chore/test-heap-ceiling
Sep 27, 2026
Merged

PierreBrisorgueil merged 2 commits into
masterfrom
chore/test-heap-ceiling

Conversation

@PierreBrisorgueil

Copy link
Copy Markdown
Contributor

Jest with ESM modules leaks memory per suite, so large suites crash with a heap error around Node's default 4 GB limit. Every non-coverage test script now sets --max-old-space-size=8192 (a ceiling, not a reservation). Coverage scripts keep their own flags. MIGRATIONS.md tells downstream projects to apply the same change to their own package.json.

Closes #3948 · epic #4019

https://claude.ai/code/session_015td7sshifbRrYrHbKgheiR

--experimental-vm-modules leaks ESM module registries between suites
(upstream jest issue, still present on jest 30), hitting Node's ~4 GB
default old-space ceiling around ~280 suites (OOM, not a test
failure). Adds --max-old-space-size=8192 to the NODE_OPTIONS value on
`test` and `test:unit` only; `:coverage` variants already carry their
own flag and are untouched.

Closes #3948

Claude-Session: https://claude.ai/code/session_015td7sshifbRrYrHbKgheiR
@PierreBrisorgueil PierreBrisorgueil added the Tests Adding missing tests or correcting existing label Sep 27, 2026
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: pierreb-devkit/Node/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e10d60ec-c2a2-4848-82a0-22cafc22a945

📥 Commits

Reviewing files that changed from the base of the PR and between 7842528 and 3a8c217.

📒 Files selected for processing (2)
  • MIGRATIONS.md
  • package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.48%. Comparing base (7842528) to head (3a8c217).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4144   +/-   ##
=======================================
  Coverage   94.48%   94.48%           
=======================================
  Files         170      170           
  Lines        6036     6036           
  Branches     1946     1947    +1     
=======================================
  Hits         5703     5703           
  Misses        271      271           
  Partials       62       62           
Flag Coverage Δ
integration 64.26% <ø> (ø)
unit 79.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7842528...3a8c217. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PierreBrisorgueil
PierreBrisorgueil merged commit fb85170 into master Sep 27, 2026
8 checks passed
@PierreBrisorgueil
PierreBrisorgueil deleted the chore/test-heap-ceiling branch September 27, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tests Adding missing tests or correcting existing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔧 Raise test/test:unit heap ceiling (jest ESM OOM on large suites)

1 participant