You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(prefer-presence-queries): ignore getBy* inside within for on absence queries (#740)
* fix: ignore getBy inside of within for prefer-presence-queries on absence queries
* docs: within treatment in prefer-presence-queries
---------
Co-authored-by: Mario Beltrán <[email protected]>
Copy file name to clipboardexpand all lines: docs/rules/prefer-presence-queries.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The (DOM) Testing Library allows to query DOM elements using different types of
13
13
14
14
This rule fires whenever:
15
15
16
-
-`queryBy*` or `queryAllBy*` are used to assert element **is** present with `.toBeInTheDocument()`, `toBeTruthy()` or `.toBeDefined()` matchers or negated matchers from case below.
16
+
-`queryBy*` or `queryAllBy*` are used to assert element **is** present with `.toBeInTheDocument()`, `toBeTruthy()` or `.toBeDefined()` matchers or negated matchers from case below, or when used inside a `within()` clause.
17
17
-`getBy*` or `getAllBy*` are used to assert element **is not** present with `.toBeNull()` or `.toBeFalsy()` matchers or negated matchers from case above.
0 commit comments