Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c20b8fe

Browse files
committed
Fix formatting in test utils docs
(cherry picked from commit 66881ae)
1 parent 356b8f3 commit c20b8fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/docs/10.4-test-utils.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ Simulate.{eventName}(DOMElement element, object eventData)
1717
Simulate an event dispatch on a DOM node with optional `eventData` event data. **This is possibly the single most useful utility in `ReactTestUtils`.**
1818

1919
**Clicking an element**
20+
2021
```javascript
2122
var node = React.findDOMNode(this.refs.button);
2223
React.addons.TestUtils.Simulate.click(node);
2324
```
2425

2526
**Changing the value of an input field and then pressing ENTER**
27+
2628
```javascript
2729
var node = React.findDOMNode(this.refs.input);
2830
node.value = 'giraffe'

0 commit comments

Comments
 (0)