Skip to content

fix: fire event should not throw for disabled handler #470

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 4 commits into from
Jul 31, 2020

Conversation

mdjastrzebski
Copy link
Member

Summary

Fixes #469

RNTL has a check that throws error when event handler missing. This is intended to inform developer that there is a mismatch between test assertions and components under test. This PR fixes a cases when this check throws error while component has a disabled event handler.

Test plan

  • updated tests for present & disabled handler not to throw
  • we already have test for missing handler (not disabled), and for success cases

@mdjastrzebski mdjastrzebski requested a review from thymikee July 31, 2020 08:11
@mdjastrzebski mdjastrzebski force-pushed the fix/fire-event-should-not-throw-for-disabled-handler branch from 7f1f126 to 1eaf07e Compare July 31, 2020 08:29
@thymikee thymikee merged commit 00a50a8 into master Jul 31, 2020
@thymikee thymikee deleted the fix/fire-event-should-not-throw-for-disabled-handler branch July 31, 2020 08:34
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.

No handler function found with fireEvent.press on disabled TouchableOpacity
2 participants