testing-library / native-testing-library

@@ -28,6 +28,7 @@
Loading
28 28
  Image: ['error', 'layout', 'load', 'loadEnd', 'loadStart', 'partialLoad', 'progress'],
29 29
  Modal: ['dismiss', 'orientationChange', 'requestClose', 'show'],
30 30
  Picker: [...viewEvents, 'valueChange'],
31 +
  Pressable: ['longPress', 'press', 'pressIn', 'pressOut'],
31 32
  RefreshControl: [...viewEvents, 'refresh'],
32 33
  SafeAreaView: [...viewEvents],
33 34
  ScrollView: [
@@ -108,8 +109,8 @@
Loading
108 109
}
109 110
110 111
function isDisabled(element) {
111 -
  const { accessibilityStates = [], disabled } = element.props;
112 -
  return disabled || accessibilityStates.includes('disabled');
112 +
  const { accessibilityState = {}, disabled } = element.props;
113 +
  return disabled || accessibilityState.disabled;
113 114
}
114 115
115 116
function findEventTarget(element, event) {
Files Coverage
src/lib 100.00%
Project Totals (20 files) 100.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading