File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,12 @@ We can test this component with `createRoutesStub`. It takes an array of objects
36
36
37
37
``` tsx
38
38
import { createRoutesStub } from " react-router" ;
39
- import { render , screen , waitFor } from " @testing-library/react" ;
40
- import userEvent from ' @testing-library/user-event' ;
39
+ import {
40
+ render ,
41
+ screen ,
42
+ waitFor ,
43
+ } from " @testing-library/react" ;
44
+ import userEvent from " @testing-library/user-event" ;
41
45
import { LoginForm } from " ./LoginForm" ;
42
46
43
47
test (" LoginForm renders error messages" , async () => {
@@ -65,8 +69,6 @@ test("LoginForm renders error messages", async () => {
65
69
// simulate interactions
66
70
userEvent .click (screen .getByText (" Login" ));
67
71
await waitFor (() => screen .findByText (USER_MESSAGE ));
68
- await waitFor (() =>
69
- screen .findByText (PASSWORD_MESSAGE )
70
- );
72
+ await waitFor (() => screen .findByText (PASSWORD_MESSAGE ));
71
73
});
72
74
```
You can’t perform that action at this time.
0 commit comments