diff --git a/docs/10.4-test-utils.md b/docs/10.4-test-utils.md index 50f82d1e..0600aaa9 100644 --- a/docs/10.4-test-utils.md +++ b/docs/10.4-test-utils.md @@ -17,12 +17,14 @@ Simulate.{eventName}(DOMElement element, object eventData) Simulate an event dispatch on a DOM node with optional `eventData` event data. **This is possibly the single most useful utility in `ReactTestUtils`.** **Clicking an element** + ```javascript var node = React.findDOMNode(this.refs.button); React.addons.TestUtils.Simulate.click(node); ``` **Changing the value of an input field and then pressing ENTER** + ```javascript var node = React.findDOMNode(this.refs.input); node.value = 'giraffe'