Skip to content

Commit

Permalink
Update to Jest 29 (#34724)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #34724

Following on from the recent upgrade from Jest 26->27, this brings us up to present day Jest 29 for tests of React Native itself, Metro, and Meta-internal code. An update to the template for RN apps will follow.

Changelog:
[Internal][Fixed] Update to Jest 29

Reviewed By: huntie

Differential Revision: D39543504

fbshipit-source-id: 8edfb1de630eb4eb340d4a188b0804bb50b5d21e
  • Loading branch information
robhogan authored and facebook-github-bot committed Sep 20, 2022
1 parent a0d1585 commit 2cb320a
Show file tree
Hide file tree
Showing 4 changed files with 626 additions and 828 deletions.
9 changes: 8 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ module.exports = {
'.*': './jest/private/preprocessor.js',
},
setupFiles: ['./jest/setup.js'],
timers: 'legacy',
fakeTimers: {
enableGlobally: true,
legacyFakeTimers: true,
},
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
testRegex: '/__tests__/.*-test\\.js$',
testPathIgnorePatterns: [
'/node_modules/',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"react": "18.2.0"
},
"dependencies": {
"@jest/create-cache-key-function": "^27.5.1",
"@jest/create-cache-key-function": "^29.0.3",
"@react-native-community/cli": "^9.0.0",
"@react-native-community/cli-platform-android": "^9.0.0",
"@react-native-community/cli-platform-ios": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"eslint-plugin-relay": "^1.8.3",
"flow-bin": "^0.187.1",
"inquirer": "^7.1.0",
"jest": "^27.5.1",
"jest": "^29.0.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.13.1",
"metro-babel-register": "0.72.1",
Expand Down
Loading

0 comments on commit 2cb320a

Please sign in to comment.