Skip to content

Commit

Permalink
docs: add advice to use fireEvent over Simulate (testing-library#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gpx authored and alexkrolick committed Sep 13, 2018
1 parent 8d711da commit 23cf56a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-testing-library/README.md
Expand Up @@ -326,6 +326,8 @@ Note: `Simulate` does not simulate _browser_ events, meaning if you have an elem

calling `Simulate.click` will not cause the submit event to be invoked. In order to get around this and for more info, see [`fireEvent`](#fireeventnode-htmlelement-event-event).

In general, it is better to use `fireEvent` whenever possible because it mimics more closely what happens in the browser when an event happens.

### `wait`

Defined as:
Expand Down

0 comments on commit 23cf56a

Please sign in to comment.