Skip to content

Commit 4abd414

Browse files
committed
docs(await-async-query): add valid and invalid examples using screen
1 parent 8bd20d6 commit 4abd414

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/rules/await-async-query.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ const bar = () => {
3030
findByText('submit');
3131
// ...
3232
};
33+
34+
const baz = () => {
35+
// ...
36+
screen.findAllByPlaceholderText('name');
37+
// ...
38+
};
3339
```
3440

3541
Examples of **correct** code for this rule:
@@ -50,6 +56,12 @@ const bar = () => {
5056
});
5157
};
5258

59+
const baz = () => {
60+
// ...
61+
await screen.findAllByPlaceholderText('name');
62+
// ...
63+
};
64+
5365
// return the promise within a function is correct too!
5466
const findMyButton = () => findByText('my button');
5567

0 commit comments

Comments
 (0)