-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: bump RN to 0.62 #273
Conversation
@@ -57,7 +57,9 @@ describe('fireEvent', () => { | |||
}); | |||
|
|||
test('should throw an Error when event handler was not found', () => { | |||
const { getByTestId } = render(<WithoutEventComponent />); | |||
const { getByTestId } = render( | |||
<WithoutEventComponent onPress={() => 'this is not passed to children'} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on #28 I've added this instead of the should not bubble event to root element
test that started to fail
test('should not bubble event to root element', () => { | ||
const onPressMock = jest.fn(); | ||
const { getByTestId } = render( | ||
<TouchableOpacity onPress={onPressMock}> | ||
<Text testID="test">Content</Text> | ||
</TouchableOpacity> | ||
); | ||
|
||
expect(() => fireEvent.press(getByTestId('test'))).toThrow(); | ||
expect(onPressMock).not.toHaveBeenCalled(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test seems fishy and not testing what it's supposed to. Not really sure why it didn't fail earlier, since the test
testID is there, we can press it, and closest onPress
is bound, so it should be called.
Summary
Blocked by facebook/react-native#28520
Test plan
CI passes