Skip to content

Commit 515b447

Browse files
jaworekmdjastrzebski
authored andcommitted
better name
1 parent fd33357 commit 515b447

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/matchers/__tests__/to-be-disabled.test.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,26 @@ import {
1212
import { render } from '../..';
1313
import '../extend-expect';
1414

15-
const ALLOWED_COMPONENTS = {
15+
const DISABLED_PROP_COMPONENTS = {
1616
TouchableHighlight,
1717
TouchableOpacity,
1818
TouchableWithoutFeedback,
1919
TouchableNativeFeedback,
2020
Pressable,
2121
};
2222

23-
const ARIA_COMPONENTS = {
23+
const ARIA_DISABLED_PROP_COMPONENTS = {
2424
View,
2525
TextInput,
2626
};
2727

28-
const ALL_COMPONENTS = { ...ALLOWED_COMPONENTS, ...ARIA_COMPONENTS };
28+
const ALL_COMPONENTS = {
29+
...DISABLED_PROP_COMPONENTS,
30+
...ARIA_DISABLED_PROP_COMPONENTS,
31+
};
2932

3033
describe('.toBeDisabled', () => {
31-
Object.entries(ALLOWED_COMPONENTS).forEach(([name, Component]) => {
34+
Object.entries(DISABLED_PROP_COMPONENTS).forEach(([name, Component]) => {
3235
test(`handle disabled prop for element ${name}`, () => {
3336
const { queryByTestId } = render(
3437
//@ts-expect-error JSX element type 'Component' does not have any construct or call signatures.ts(2604)
@@ -42,7 +45,7 @@ describe('.toBeDisabled', () => {
4245
});
4346
});
4447

45-
Object.entries(ARIA_COMPONENTS).forEach(([name, Component]) => {
48+
Object.entries(ARIA_DISABLED_PROP_COMPONENTS).forEach(([name, Component]) => {
4649
test(`handle aria-disabled prop for element ${name}`, () => {
4750
const { queryByTestId } = render(
4851
<Component aria-disabled testID={name}>

0 commit comments

Comments
 (0)