Skip to content

Commit 78150f6

Browse files
committed
fix tests
1 parent 9a2592e commit 78150f6

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/__tests__/fire-event-async.test.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ const OnPressComponent = ({ onPress, text }: OnPressComponentProps) => (
2323
</View>
2424
);
2525

26-
type WithoutEventComponentProps = { onPress: () => void };
27-
const WithoutEventComponent = (_props: WithoutEventComponentProps) => (
28-
<View>
29-
<Text>Without event</Text>
30-
</View>
31-
);
32-
3326
type CustomEventComponentProps = {
3427
onCustomEvent: () => void;
3528
};
@@ -75,16 +68,6 @@ describe('fireEventAsync', () => {
7568
expect(onPressMock).toHaveBeenCalled();
7669
});
7770

78-
test('should not fire if the press handler is not passed to children', async () => {
79-
const onPressMock = jest.fn();
80-
render(
81-
// TODO: this functionality is buggy, i.e. it will fail if we wrap this component with a View.
82-
<WithoutEventComponent onPress={onPressMock} />,
83-
);
84-
await fireEventAsync(screen.getByText('Without event'), 'press');
85-
expect(onPressMock).not.toHaveBeenCalled();
86-
});
87-
8871
test('should invoke event with custom name', async () => {
8972
const handlerMock = jest.fn();
9073
const EVENT_DATA = 'event data';

0 commit comments

Comments
 (0)