Do I need await before every userEvent call? #1050
-
Hey, user.click(getRow(rowName));
await screen.findByText(`Loading...`); it works, but I get following warning: console.error
Warning: You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. After I put the await before the await user.click(getRow(rowName));
await screen.findByText(`Loading...`); The warning disappears, but the Can you give me some hints? Thanks and best regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
https://github.com/testing-library/user-event/releases/tag/v14.0.0
The change was discussed in #504 How a test with |
Beta Was this translation helpful? Give feedback.
-
Having a similar problem after updating to
This works but get the |
Beta Was this translation helpful? Give feedback.
https://github.com/testing-library/user-event/releases/tag/v14.0.0
The change was discussed in #504
How a test with
v14
should look like is documented at https://testing-library.com/docs/user-event/intro#writing-tests-with-userevent