Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jest): reduce memory usage #8753

Merged
merged 3 commits into from
May 4, 2023
Merged

Conversation

caugner
Copy link
Contributor

@caugner caugner commented May 3, 2023

Summary

(MP-363)

Problem

The kumascript unit tests are failing since April, because they're reaching the maximum heap size.

Solution

  1. Combine node --expose-gc with jest --logHeapUsage to regularly collect garbage.
  2. Enable ts-jest's isolateModules option.
  3. (Make sure that the kumascript unit test runs if jest.config.json or package.json change.)

How did you test this change?

@caugner caugner force-pushed the reduce-kumascript-memory-usage branch 2 times, most recently from 557ae27 to 0284be9 Compare May 3, 2023 21:35
@caugner caugner requested a review from LeoMcA May 3, 2023 21:42
@caugner caugner force-pushed the reduce-kumascript-memory-usage branch from 0c5aff6 to 8b989de Compare May 3, 2023 21:45
Copy link
Contributor

@fiji-flo fiji-flo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fiji-flo fiji-flo merged commit 47910ee into main May 4, 2023
@fiji-flo fiji-flo deleted the reduce-kumascript-memory-usage branch May 4, 2023 08:15
captainbrosset pushed a commit to captainbrosset/yari that referenced this pull request May 4, 2023
* fix(jest): reduce memory usage

By combining `node --expose-gc` with `jest --logHeapUsage`.

* fix(jest): isolate modules with ts-jest

* ci(pr-kumascript): run if {jest.config,package}.json change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants