Skip to content

Commit 82521a5

Browse files
authored
Update setup to include import statement
I spent an hour trying to figure out what was wrong with my code, not realizing that user-events was an unnamed export. Please put an import statement somewhere in the docs, if not here, to save poor idiots like myself.
1 parent c91ebd8 commit 82521a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/user-event/setup.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ This allows to write multiple consecutive interactions that behave just like the
2727
described interactions by a real user.
2828

2929
```js
30+
import userEvent from "@testing-library/user-event";
31+
3032
const user = userEvent.setup()
3133

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

0 commit comments

Comments
 (0)