Skip to content

Commit 7ac842b

Browse files
chore: set maxWorker to 50% (#37381)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Jest is resource hungry and because of that it is advised to fine tune parallelization config in order to get the most of reliability and speed of execution. Not setting it up entirely can lead to random timeout issues, longer run times, etc. See the troubleshoot from Jest itself - https://jestjs.io/docs/troubleshooting#tests-are-extremely-slow-on-docker-andor-continuous-integration-ci-server Or the performance analysis on jest runners done by Adobe - https://medium.com/adobetech/improve-jest-runner-performance-a8f56708ba94 This PR is just an initial setup, but we need to fine tune the config for both local and CI execution. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37381?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Set Jest integration tests to use maxWorkers '50%' in `jest.integration.config.js` to limit concurrency. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ad45ba0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 30453d2 commit 7ac842b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jest.integration.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
coverageDirectory: './coverage/integration',
77
coveragePathIgnorePatterns: ['.stories.*', '.snap', '.test.(js|ts|tsx)'],
88
coverageReporters: ['html', 'json'],
9+
maxWorkers: '50%',
910
// The path to the Prettier executable used to format snapshots
1011
// Jest doesn't support Prettier 3 yet, so we use Prettier 2
1112
prettierPath: require.resolve('prettier-2'),

0 commit comments

Comments
 (0)