File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Examples of **correct** code for this rule:
29
29
30
30
``` js
31
31
expect (screen .queryByText (" foo" )).toBeInTheDocument ();
32
- expect (screen .queryByText (" foo" )).toBeInTheDocument ();
32
+ expect (await screen .findByText (" foo" )).toBeInTheDocument ();
33
33
expect (queryByText (" foo" )).toBeInTheDocument ();
34
34
expect (wrapper .queryAllByTestId (" foo" )).toBeInTheDocument ();
35
35
expect (screen .getAllByLabel (" foo-bar" )).toHaveLength (2 );
@@ -39,7 +39,10 @@ const foo = screen.getAllByText("foo");
39
39
expect (foo).toHaveLength (3 );
40
40
41
41
const bar = screen .queryByText (" bar" );
42
- expect (bar).not .toBeInTheDocument ();
42
+ expect (bar).not .toBeDefined ();
43
+
44
+ const baz = await screen .findByText (" baz" );
45
+ expect (baz).toBeDefined ()
43
46
```
44
47
45
48
## When Not To Use It
You can’t perform that action at this time.
0 commit comments