Skip to content

Update docs to indicate named export should be used for userEvent #1476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update intro.mdx to use named export for userEvent
  • Loading branch information
ahayes91 authored Mar 19, 2025
commit 61331d9592011a701b1120d2171a8253be2198fb
4 changes: 2 additions & 2 deletions docs/user-event/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ itself - e.g. in a `before`/`after` hook - for reasons described in
["Avoid Nesting When You're Testing"](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing).

```js
import userEvent from '@testing-library/user-event'
import {userEvent} from '@testing-library/user-event'

// inlining
test('trigger some awesome feature when clicking the button', async () => {
Expand All @@ -80,7 +80,7 @@ test('trigger some awesome feature when clicking the button', async () => {
```

```js
import userEvent from '@testing-library/user-event'
import {userEvent} from '@testing-library/user-event'

// setup function
function setup(jsx) {
Expand Down