Skip to content

Commit 610887e

Browse files
Use node 16 to run oldes tests
1 parent 38e6036 commit 610887e

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Node
2929
uses: actions/setup-node@v4
3030
with:
31-
node-version: ${{ matrix.versions == 'oldest' && '18' || '20' }}
31+
node-version: ${{ matrix.versions == 'oldest' && '16' || '20' }}
3232
- name: Print system information
3333
run: |
3434
echo "Linux release: "; cat /etc/issue
@@ -104,7 +104,7 @@ jobs:
104104
- name: Setup Node
105105
uses: actions/setup-node@v4
106106
with:
107-
node-version: ${{ matrix.versions == 'oldest' && '18' || '20' }}
107+
node-version: ${{ matrix.versions == 'oldest' && '16' || '20' }}
108108
- name: Print system information
109109
run: |
110110
echo "Linux release: "; cat /etc/issue

.github/workflows/package-js-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ jobs:
4545
run: yarn test
4646
# TODO: Remove this once we made these tests compatible with React 19
4747
- name: Run JS unit tests for Renderer package with React 18 (for tests not compatible with React 19)
48+
if: matrix.versions == 'newest'
4849
run: yarn test:react-18

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ module.exports = {
1212
}
1313
: {
1414
'react-server-dom-webpack/client': '<rootDir>/node_package/tests/emptyForTesting.js',
15+
'^@testing-library/dom$': '<rootDir>/node_package/tests/emptyForTesting.js',
16+
'^@testing-library/react$': '<rootDir>/node_package/tests/emptyForTesting.js',
1517
},
1618
};

script/convert

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ File.rename(old_config, new_config)
1515

1616
gsub_file_content("../Gemfile.development_dependencies", 'gem "shakapacker", "8.0.0"', 'gem "shakapacker", "6.6.0"')
1717

18-
# Knip doesn't work on the oldest supported Node version and isn't needed there anyway
18+
# The following packages don't work on the oldest supported Node version and aren't needed there anyway
1919
gsub_file_content("../package.json", /"knip": "[^"]*",/, "")
20+
gsub_file_content("../package.json", %r{"@testing-library/dom": "[^"]*",}, "")
21+
gsub_file_content("../package.json", %r{"@testing-library/react": "[^"]*",}, "")
2022

2123
gsub_file_content("../spec/dummy/package.json", '"shakapacker": "8.0.0",', '"shakapacker": "6.6.0",')
2224

0 commit comments

Comments
 (0)