Skip to content

Commit 3761acf

Browse files
committed
fix(docs): mark code keywords with `` and add a period to end of sentence
1 parent c3504a7 commit 3761acf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/rules/prefer-find-by.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Suggest using `findBy*` methods instead of the `waitFor` + `getBy` queries (`testing-library/prefer-find-by`)
22

3-
findBy* queries are a simple combination of getBy* queries and waitFor. The findBy\* queries accept the waitFor options as the last argument. (i.e. screen.findByText('text', queryOptions, waitForOptions))
3+
`findBy*` queries are a simple combination of `getBy*` queries and `waitFor`. The `findBy*` queries accept the `waitFor` options as the last argument. (i.e. `screen.findByText('text', queryOptions, waitForOptions)`)
44

55
## Rule details
66

77
This rule aims to use `findBy*` or `findAllBy*` queries to wait for elements, rather than using `waitFor`, or the deprecated methods `waitForElement` and `wait`.
8-
This rule analyzes those cases where `waitFor` is used with just one query method, in the form of an arrow function with only one statement (that is, without a block of statements). Given the callback could be more complex, this rule does not consider function callbacks or arrow functions with blocks of code
8+
This rule analyzes those cases where `waitFor` is used with just one query method, in the form of an arrow function with only one statement (that is, without a block of statements). Given the callback could be more complex, this rule does not consider function callbacks or arrow functions with blocks of code.
99

1010
Examples of **incorrect** code for this rule
1111

@@ -78,7 +78,7 @@ await waitFor(() => expect(getAllByText('bar')).toBeDisabled());
7878

7979
## When Not To Use It
8080

81-
- Not encouraging use of findBy shortcut from testing library best practices
81+
- Not encouraging use of `findBy` shortcut from testing library best practices
8282

8383
## Further Reading
8484

0 commit comments

Comments
 (0)