Update to Jest 29 (#34724)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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: b47fdb678212b475881ec19085f6cd45a4530333
This commit is contained in:
Rob Hogan 2022-09-20 14:15:50 -07:00 committed by Facebook GitHub Bot
parent 6eee307778
commit c27501bb87
4 changed files with 623 additions and 825 deletions

View File

@ -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/',

View File

@ -106,7 +106,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",

View File

@ -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",

1435
yarn.lock

File diff suppressed because it is too large Load Diff