Skip to content

Commit b3e48df

Browse files
Update docs/user-event/intro.mdx
Adopting CR suggestion Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
1 parent ae1734f commit b3e48df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/user-event/intro.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ to test interaction with your components.
3232

3333
## Writing tests with `userEvent`
3434

35-
We recommend using [`userEvent.setup()`](setup.mdx) when rendering your
36-
component and inlining that rendering and setup in your test, or using a setup
35+
We recommend invoking [`userEvent.setup()`](setup.mdx) before the component is rendered.
36+
This can be done in the test itself, or by using a setup
3737
function. We discourage rendering or using any `userEvent` functions outside of
3838
the test itself - e.g. in a `before`/`after` hook - for reasons described in
3939
["Avoid Nesting When You're Testing"](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing).

0 commit comments

Comments
 (0)