Skip to content
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

Add ReactTestUtils to addons #1112

Merged
merged 2 commits into from
Feb 19, 2014
Merged

Conversation

petehunt
Copy link
Contributor

Docs page is a bit ugly but we should revisit how we do our reference pages sometime anyway.

@petehunt
Copy link
Contributor Author

   raw     gz Compared to last run
     =      = build/JSXTransformer-previous.js
     =      = build/JSXTransformer.js
     =      = build/closure-react.js
     =      = build/react-previous.min.js
     =      = build/react-test.js
+11832  +2706 build/react-with-addons.js
     =      = build/react-with-addons.min.js
     =      = build/react.js
     =      = build/react.min.js


#### Simulate.{eventName}({ReactComponent|DOMElement} element, object nativeEventData)

Simulate an event dispatch on a React component instance or browser DOM node with optional `nativeEventData` event data. This uses React's synthetic event system so it works outside of the browser. **This is possibly the single most useful utility in `ReactTestUtils`.**
Copy link
Member

Choose a reason for hiding this comment

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

This uses React's synthetic event system

This statement isn't true yet, need #939 first.

@zpao zpao added this to the 0.9 milestone Feb 17, 2014

Simulate an event dispatch on a React component instance or browser DOM node with optional `nativeEventData` event data. This uses React's event system so it works outside of the browser. **This is possibly the single most useful utility in `ReactTestUtils`.**

**NOTE:** this helper is used to simulate browser events, so synthetic React events like `change` are not available. If you want to test `change`, simulate the underlying `input` browser event.
Copy link
Member

Choose a reason for hiding this comment

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

Let's use our "standard" format for notes and get that red box.

Note:

...

@sophiebits
Copy link
Collaborator

(I would personally prefer we merge #939 before adding this…)

@zpao
Copy link
Member

zpao commented Feb 19, 2014

So... do it for 0.9 or no?

@petehunt
Copy link
Contributor Author

Yes

Sent from my iPhone

On Feb 18, 2014, at 10:23 PM, "Paul O’Shannessy" <[email protected]mailto:[email protected]> wrote:

So... do it for 0.9 or no?


Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v1/url?u=#1112.

petehunt added a commit that referenced this pull request Feb 19, 2014
@petehunt petehunt merged commit 93e7778 into facebook:master Feb 19, 2014
@EtienneLem
Copy link

Anyone would be kind enough to provide a build of react-with-addons.js with ReactTestUtils included? I’ve been struggling with grunt build:addons for the past hour to no avail.

@sophiebits
Copy link
Collaborator

@EtienneLem
Copy link

Yes!! Thanks 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants