Skip to content

Commit d59b370

Browse files
suezzothymikee
authored andcommitted
test: handle auto pointerEvents
1 parent 1181dc8 commit d59b370

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/__tests__/fireEvent.test.js

+15
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,21 @@ test('should fire on box-none pointerEvents View', () => {
279279
expect(handlePress).toHaveBeenCalled();
280280
});
281281

282+
test('should fire on auto pointerEvents View', () => {
283+
const handlePress = jest.fn();
284+
285+
const screen = render(
286+
<View pointerEvents="auto">
287+
<Pressable onPress={handlePress}>
288+
<Text>Trigger</Text>
289+
</Pressable>
290+
</View>
291+
);
292+
293+
fireEvent.press(screen.getByText('Trigger'));
294+
expect(handlePress).toHaveBeenCalled();
295+
});
296+
282297
test('should not fire on none pointerEvents View with nested elements', () => {
283298
const handlePress = jest.fn();
284299

0 commit comments

Comments
 (0)