Skip to content

Commit 0d12011

Browse files
committed
fix react 18 test failing
1 parent 6f478ea commit 0d12011

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/__tests__/react-native-api.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { FlatList, Image, Modal, ScrollView, Switch, Text, TextInput, View } fro
33

44
import { render, screen } from '..';
55

6+
const isReact19 = React.version.startsWith('19.');
7+
const testGateReact19 = isReact19 ? test : test.skip;
8+
69
/**
710
* Tests in this file are intended to give us an proactive warning that React Native behavior has
811
* changed in a way that may impact our code like queries or event handling.
@@ -214,7 +217,7 @@ test('React Native API assumption: <FlatList> renders a single host <ScrollView>
214217
`);
215218
});
216219

217-
test('React Native API assumption: <Modal> renders a single host element', () => {
220+
testGateReact19('React Native API assumption: <Modal> renders a single host element', () => {
218221
render(
219222
<Modal testID="test">
220223
<Text>Modal Content</Text>

0 commit comments

Comments
 (0)