-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
Make sure simulated events don't warn when providing extra event properties #6380
Conversation
I think in an ideal world we'd be using the right SyntheticEvent subclass constructor for the event. This would allow us to set the properties directly on the |
@@ -474,6 +474,29 @@ describe('ReactTestUtils', function() { | |||
expect(handler).not.toHaveBeenCalled(); | |||
}); | |||
|
|||
it.only('should not warn when simulating events with extra properties', function() { |
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.
.only
Re: ideal world, relevant to #6154. |
@zpao updated the pull request. |
@zpao updated the pull request. |
Hmm, worth noting that this silences an expected warning (easier to see now on travis now that other issues are cleaned up). I'll look into that some more… |
@zpao updated the pull request. |
Is the travis test error relevant? Looks plausible. |
Nope, that's because of #6228. Will take a closer look at that test (only failing in non-createElement mode) in the morning but this should be fine. |
👍 |
fixes #6379