Skip to content

feat: being able to fire custom events that do not need to start with "on" #147

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

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

ferrannp
Copy link
Contributor

@ferrannp ferrannp commented Apr 9, 2019

Summary

If I have a custom button like:

<MyCustomButton handlePress={onPress} />

The following will not work:

fireEvent(getByTestId('my-custom-button'), 'handlePress');

Because we are trying to call onHandlePress.

Test plan

yarn test fireEvent

@thymikee thymikee requested a review from Esemesek April 9, 2019 13:21
@@ -2,3 +2,4 @@ node_modules
*.log
.eslintcache
build
.idea
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Ferran guy XD

Copy link
Collaborator

@Esemesek Esemesek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@Esemesek Esemesek merged commit 8984abb into callstack:master Apr 9, 2019
@ferrannp ferrannp deleted the feat/fire-event-custom-name branch April 9, 2019 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants