Skip to content

Commit

Permalink
docs: clarify userEvent.type
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds authored and Jesu Castillo committed Oct 23, 2020
1 parent 13989ac commit a9274e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -175,6 +175,10 @@ are typed. By default it's 0. You can use this option if your component has a
different behavior for fast or slow users. If you do this, you need to make sure
to `await`!

> To be clear, `userEvent.type` *always* returns a promise, but you *only* need
> to `await` the promise it returns if you're using the `delay` option. Otherwise
> everything runs synchronously and you can ignore the promise.
`type` will click the element before typing. To disable this, set the
`skipClick` option to `true`.

Expand Down

0 comments on commit a9274e4

Please sign in to comment.