Skip to content

Commit 8cf9138

Browse files
Remove setupFilesAfterEnv from Jest configuration and clean up convert script by removing outdated React version updates for workspace packages. This streamlines the configuration and ensures compatibility with the latest React version.
1 parent 4b94aba commit 8cf9138

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

jest.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default {
1414
}),
1515
testEnvironment: 'jsdom',
1616
setupFiles: ['<rootDir>/node_package/tests/jest.setup.js'],
17-
setupFilesAfterEnv: ['<rootDir>/node_modules/@testing-library/jest-dom'],
1817
// React Server Components tests require React 19 and only run with Node version 18 (`newest` in our CI matrix)
1918
moduleNameMapper:
2019
nodeVersion < 18

script/convert

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ gsub_file_content("../package.json", /"react": "[^"]*",/, '"react": "18.0.0",')
3838
gsub_file_content("../package.json", /"react-dom": "[^"]*",/, '"react-dom": "18.0.0",')
3939
gsub_file_content("../spec/dummy/package.json", /"react": "[^"]*",/, '"react": "18.0.0",')
4040
gsub_file_content("../spec/dummy/package.json", /"react-dom": "[^"]*",/, '"react-dom": "18.0.0",')
41-
# Update workspace package peerDependencies for minimum React version
42-
gsub_file_content("../packages/react-on-rails/package.json", /"react": ">= 16",/, '"react": ">= 18",')
43-
gsub_file_content("../packages/react-on-rails/package.json", /"react-dom": ">= 16",/, '"react-dom": ">= 18",')
44-
# Update workspace package jest command for minimum Node version support
4541
gsub_file_content(
4642
"../packages/react-on-rails/package.json",
4743
"cd ../.. && jest node_package/tests",

0 commit comments

Comments
 (0)