Skip to content

Conversation

@sophiebits
Copy link
Collaborator

Most of the time this is what you want to do, so I've renamed what was Simulate to be SimulateNative.

Now Simulate.change does what you expect, so this fixes #517 and fixes #519.

Includes/depends on #937.

@sophiebits
Copy link
Collaborator Author

/cc @chenglou @yungsters. Looks like we should probably be recreating ReactTestUtils.Simulate whenever a new event plugin is injected. Ideas for a clean API for doing so?

@zpao
Copy link
Member

zpao commented Jan 21, 2014

I like. Suggestions for changing internally? I'm guessing we could just codemod existing callsites to be SimulateNative.* and move on, though we may want to do a pass and see if some of those should be testing the synthetic.

@sophiebits
Copy link
Collaborator Author

My guess is few or none of the existing callsites should be using SimulateNative; simulating native events is useful when testing React itself or event plugins but otherwise I don't think it should be needed. If you send me more info about any failing tests, that would be helpful -- it seems likely that there are changes that could be made to this code.

Most of the time this is what you want to do, so I've renamed what was Simulate to be SimulateNative.

Now Simulate.change does what you expect, so this fixes facebook#517 and fixes facebook#519.
chenglou added a commit that referenced this pull request Feb 19, 2014
Simulate synthetic events using ReactTestUtils
@chenglou chenglou merged commit e13977c into facebook:master Feb 19, 2014
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.

ReactDOMInput should support ReactLink in IE ReactDOMInput should properly control a value of number 0 fails in IE

4 participants