Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: CI flakey unit tests TypeErrors on react-native/jest/setup.js gl…
…obal.performance (#8046) ## **Description** Fix recent CI flakey failing unit tests: `TypeError: Cannot assign to read only property 'performance' of object '[object global]'` Failing at: https://github.com/facebook/react-native/blob/v0.71.14/jest/setup.js#L20-L22 _Nb: https://github.com/facebook/react-native/blob/v0.72.0/jest/setup.js 404 file no longer exists in this future RN ver_ Reconsider current node/jest/RN vers we're using (see [issue](facebook/react-native#35701) and [comment](#8046 (comment)) below) > it broke between node 18.18 and 18.19 - [Jest relies on descriptor.writable](https://github.com/jestjs/jest/blob/v28.1.3/packages/jest-environment-node/src/index.ts#L88) but it's not longer returned in the descriptor Nb: Node 18.19 [changelog](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#2023-11-29-version-18190-hydrogen-lts-targos) ## **Related issues** Fixes: #8051 ## **Manual testing steps** Run unit tests ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] I’ve properly set the pull request status: - [x] In case it's not yet "ready for review", I've set it to "draft". - [x] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **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.
- Loading branch information