Skip to content

Commit b9fef59

Browse files
authored
feat(prefer-presence-queries): support react-native matcher toBeOnTheScreen (#844)
Update `testing-library/prefer-presence-queries` rule to support custom react-native matcher `toBeOnTheScreen`s Signed-off-by: Davyd NRB <[email protected]>
1 parent 9709343 commit b9fef59

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)