Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/actions/setup-deps-rn-nightly/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@ runs:
yarn add -D \
react-native@nightly \
@react-native/babel-preset@nightly \
[email protected] \
[email protected] \
@types/react@^19.2.7 \
[email protected]
shell: bash
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,45 @@ jobs:
- name: Typecheck
run: yarn typecheck

typecheck-rn-latest:
runs-on: ubuntu-latest
name: Typecheck RN Latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-latest

- name: Typecheck
run: yarn typecheck

typecheck-rn-next:
runs-on: ubuntu-latest
name: Typecheck RN Next
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-next

- name: Typecheck
run: yarn typecheck

typecheck-rn-nightly:
runs-on: ubuntu-latest
name: Typecheck RN Nightly
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-nightly

- name: Typecheck
run: yarn typecheck

test:
runs-on: ubuntu-latest
name: Test
Expand Down Expand Up @@ -252,3 +291,42 @@ jobs:

- name: Test
run: yarn test:ci

test-rn-latest:
runs-on: ubuntu-latest
name: Test RN Latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-latest

- name: Test
run: yarn test:ci

test-rn-next:
runs-on: ubuntu-latest
name: Test RN Next
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-next

- name: Test
run: yarn test:ci

test-rn-nightly:
runs-on: ubuntu-latest
name: Test RN Nightly
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps-rn-nightly

- name: Test
run: yarn test:ci
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"peerDependencies": {
"jest": ">=29.0.0",
"react": ">=19.0.0",
"react-native": ">=0.71",
"react-native": ">=0.78",
"universal-test-renderer": "~0.10.1"
},
"peerDependenciesMeta": {
Expand All @@ -73,7 +73,7 @@
"@babel/preset-react": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@callstack/eslint-config": "^15.0.0",
"@react-native/babel-preset": "0.82.1",
"@react-native/babel-preset": "0.83.1",
"@release-it/conventional-changelog": "^10.0.2",
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
"@types/jest": "^30.0.0",
Expand All @@ -86,8 +86,8 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"jest": "^30.2.0",
"prettier": "^3.6.2",
"react": "19.1.1",
"react-native": "0.82.1",
"react": "19.2.0",
"react-native": "0.83.1",
"react-native-gesture-handler": "^2.29.1",
"release-it": "^19.0.6",
"typescript": "^5.9.3",
Expand All @@ -99,6 +99,6 @@
},
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
"node": ">=20"
}
}
4 changes: 2 additions & 2 deletions src/__tests__/fire-event.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ describe('React.Suspense integration', () => {
});
});

test('should handle unmounted elements gracefully in async mode', async () => {
test('should handle unmounted elements gracefully', async () => {
const onPress = jest.fn();
await render(
<TouchableOpacity onPress={onPress}>
Expand All @@ -651,7 +651,7 @@ test('should handle unmounted elements gracefully in async mode', async () => {
);

const element = screen.getByText('Test');
await screen.unmount();
await screen.rerender(<View />);

// Firing async event on unmounted element should not crash
await fireEvent.press(element);
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/unsafe-fire-event-sync.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,14 @@ describe('native events', () => {

test('should handle unmounted elements gracefully', () => {
const onPress = jest.fn();
const { unmount } = unsafe_renderSync(
const { rerender } = unsafe_renderSync(
<TouchableOpacity onPress={onPress}>
<Text>Test</Text>
</TouchableOpacity>,
);

const element = screen.getByText('Test');
unmount();
rerender(<View />);

// Firing event on unmounted element should not crash
unsafe_fireEventSync.press(element);
Expand Down
Loading