Skip to content

Commit

Permalink
docs: Update setup to include import statement (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundsj authored Oct 6, 2022
1 parent c91ebd8 commit d36b012
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/user-event/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ This allows to write multiple consecutive interactions that behave just like the
described interactions by a real user.

```js
import userEvent from "@testing-library/user-event";

const user = userEvent.setup()

await user.keyboard('[ShiftLeft>]') // Press Shift (without releasing it)
Expand Down

0 comments on commit d36b012

Please sign in to comment.