@@ -12,23 +12,26 @@ import {
12
12
import { render } from '../..' ;
13
13
import '../extend-expect' ;
14
14
15
- const ALLOWED_COMPONENTS = {
15
+ const DISABLED_PROP_COMPONENTS = {
16
16
TouchableHighlight,
17
17
TouchableOpacity,
18
18
TouchableWithoutFeedback,
19
19
TouchableNativeFeedback,
20
20
Pressable,
21
21
} ;
22
22
23
- const ARIA_COMPONENTS = {
23
+ const ARIA_DISABLED_PROP_COMPONENTS = {
24
24
View,
25
25
TextInput,
26
26
} ;
27
27
28
- const ALL_COMPONENTS = { ...ALLOWED_COMPONENTS , ...ARIA_COMPONENTS } ;
28
+ const ALL_COMPONENTS = {
29
+ ...DISABLED_PROP_COMPONENTS ,
30
+ ...ARIA_DISABLED_PROP_COMPONENTS ,
31
+ } ;
29
32
30
33
describe ( '.toBeDisabled' , ( ) => {
31
- Object . entries ( ALLOWED_COMPONENTS ) . forEach ( ( [ name , Component ] ) => {
34
+ Object . entries ( DISABLED_PROP_COMPONENTS ) . forEach ( ( [ name , Component ] ) => {
32
35
test ( `handle disabled prop for element ${ name } ` , ( ) => {
33
36
const { queryByTestId } = render (
34
37
//@ts -expect-error JSX element type 'Component' does not have any construct or call signatures.ts(2604)
@@ -42,7 +45,7 @@ describe('.toBeDisabled', () => {
42
45
} ) ;
43
46
} ) ;
44
47
45
- Object . entries ( ARIA_COMPONENTS ) . forEach ( ( [ name , Component ] ) => {
48
+ Object . entries ( ARIA_DISABLED_PROP_COMPONENTS ) . forEach ( ( [ name , Component ] ) => {
46
49
test ( `handle aria-disabled prop for element ${ name } ` , ( ) => {
47
50
const { queryByTestId } = render (
48
51
< Component aria-disabled testID = { name } >
0 commit comments