File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ export type ByRoleOptions = CommonQueryOptions &
39
39
value ?: AccessibilityValueMatcher ;
40
40
} ;
41
41
42
- const matchRole = ( node : ReactTestInstance , role : ByRoleMatcher ) => {
43
- return matchStringProp ( getRole ( node ) , role ) ;
44
- } ;
45
-
46
42
const matchAccessibleNameIfNeeded = ( node : ReactTestInstance , name ?: TextMatch ) => {
47
43
if ( name == null ) return true ;
48
44
@@ -71,7 +67,7 @@ const queryAllByRole = (
71
67
( node ) =>
72
68
// run the cheapest checks first, and early exit to avoid unneeded computations
73
69
isAccessibilityElement ( node ) &&
74
- matchRole ( node , normalizedRole ) &&
70
+ matchStringProp ( getRole ( node ) , normalizedRole ) &&
75
71
matchAccessibleStateIfNeeded ( node , options ) &&
76
72
matchAccessibilityValueIfNeeded ( node , options ?. value ) &&
77
73
matchAccessibleNameIfNeeded ( node , options ?. name ) ,
You can’t perform that action at this time.
0 commit comments