Skip to content

Commit

Permalink
feat: support RN 0.63 pressable in toBeDisabled (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Castro <bruno.castro@codeminer42.com>
  • Loading branch information
mateusbw and brunohkbx authored Sep 7, 2020
1 parent 1c6659c commit 2649017
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@babel/cli": "7.2.3",
"@babel/core": "7.4.0",
"@babel/runtime": "7.4.0",
"@testing-library/react-native": "^4.0.1",
"@testing-library/react-native": "^6.0.0",
"commitizen": "^3.0.7",
"cz-conventional-changelog": "^2.1.0",
"husky": "^1.3.1",
Expand All @@ -48,7 +48,7 @@
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"react": "16.8.6",
"react-native": "^0.59.6",
"react-native": "0.63.2",
"react-test-renderer": "16.8.6",
"semantic-release": "^15.13.3"
},
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/to-be-disabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
TouchableWithoutFeedback,
View,
TextInput,
Pressable,
} from 'react-native';
import { render } from '@testing-library/react-native';

Expand All @@ -16,6 +17,7 @@ const ALLOWED_COMPONENTS = {
TouchableHighlight,
TouchableOpacity,
TouchableWithoutFeedback,
Pressable,
};

describe('.toBeDisabled', () => {
Expand Down
1 change: 1 addition & 0 deletions src/to-be-disabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const DISABLE_TYPES = [
'TouchableWithoutFeedback',
'View',
'TextInput',
'Pressable',
];

function isElementDisabledByParent(parent) {
Expand Down

0 comments on commit 2649017

Please sign in to comment.