Skip to content

Commit efec2f7

Browse files
committed
Update testing-library/prefer-presence-queries rule to support custom react-native matcher toBeOnTheScreens
Signed-off-by: Davyd NRB <[email protected]>
1 parent 9709343 commit efec2f7

File tree

2 files changed

+232
-1
lines changed

2 files changed

+232
-1
lines changed

lib/utils/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ const ALL_RETURNING_NODES = [
110110
...METHODS_RETURNING_NODES,
111111
];
112112

113-
const PRESENCE_MATCHERS = ['toBeInTheDocument', 'toBeTruthy', 'toBeDefined'];
113+
const PRESENCE_MATCHERS = [
114+
'toBeOnTheScreen',
115+
'toBeInTheDocument',
116+
'toBeTruthy',
117+
'toBeDefined',
118+
];
114119
const ABSENCE_MATCHERS = ['toBeNull', 'toBeFalsy'];
115120

116121
export {

0 commit comments

Comments
 (0)