Skip to content

Commit 2759d40

Browse files
committed
docs(no-await-sync-query): add valid and invalid examples using screen
1 parent e710d39 commit 2759d40

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/rules/no-await-sync-query.md

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ const bar = () => {
2929
// ...
3030
});
3131
};
32+
33+
const baz = () => {
34+
// ...
35+
const button = await screen.getByText('submit');
36+
};
3237
```
3338

3439
Examples of **correct** code for this rule:
@@ -45,6 +50,11 @@ const bar = () => {
4550
const button = getByText('submit');
4651
// ...
4752
};
53+
54+
const baz = () => {
55+
// ...
56+
const button = screen.getByText('submit');
57+
};
4858
```
4959

5060
## Further Reading

0 commit comments

Comments
 (0)