There was an error while loading. Please reload this page.
1 parent ae1734f commit b3e48dfCopy full SHA for b3e48df
docs/user-event/intro.mdx
@@ -32,8 +32,8 @@ to test interaction with your components.
32
33
## Writing tests with `userEvent`
34
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
+We recommend invoking [`userEvent.setup()`](setup.mdx) before the component is rendered.
+This can be done in the test itself, or by using a setup
37
function. We discourage rendering or using any `userEvent` functions outside of
38
the test itself - e.g. in a `before`/`after` hook - for reasons described in
39
["Avoid Nesting When You're Testing"](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing).
0 commit comments