Skip to content

Commit b9bd04e

Browse files
author
Marcel Lasaj
authored
Expand Jest mocks (#1364)
1 parent b2fb8ad commit b9bd04e

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

src/mocks.ts

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,59 @@
1-
import { View, ScrollView as RNScrollView } from 'react-native';
1+
import {
2+
TouchableHighlight,
3+
TouchableNativeFeedback,
4+
TouchableOpacity,
5+
TouchableWithoutFeedback,
6+
ScrollView,
7+
FlatList,
8+
Switch,
9+
TextInput,
10+
DrawerLayoutAndroid,
11+
View,
12+
} from 'react-native';
213
import { State } from './State';
314
import { Directions } from './Directions';
415

516
const NOOP = () => {
617
// do nothing
718
};
8-
const ScrollView = RNScrollView;
919
const PanGestureHandler = View;
1020
const attachGestureHandler = NOOP;
1121
const createGestureHandler = NOOP;
1222
const dropGestureHandler = NOOP;
1323
const updateGestureHandler = NOOP;
24+
const NativeViewGestureHandler = View;
25+
const TapGestureHandler = View;
26+
const ForceTouchGestureHandler = View;
27+
const LongPressGestureHandler = View;
28+
const PinchGestureHandler = View;
29+
const RotationGestureHandler = View;
30+
const FlingGestureHandler = View;
31+
const RawButton = TouchableNativeFeedback;
32+
const BaseButton = TouchableNativeFeedback;
33+
const RectButton = TouchableNativeFeedback;
34+
const BorderlessButton = TouchableNativeFeedback;
1435

1536
export default {
37+
TouchableHighlight,
38+
TouchableNativeFeedback,
39+
TouchableOpacity,
40+
TouchableWithoutFeedback,
1641
ScrollView,
42+
FlatList,
43+
Switch,
44+
TextInput,
45+
DrawerLayoutAndroid,
46+
NativeViewGestureHandler,
47+
TapGestureHandler,
48+
ForceTouchGestureHandler,
49+
LongPressGestureHandler,
50+
PinchGestureHandler,
51+
RotationGestureHandler,
52+
FlingGestureHandler,
53+
RawButton,
54+
BaseButton,
55+
RectButton,
56+
BorderlessButton,
1757
PanGestureHandler,
1858
attachGestureHandler,
1959
createGestureHandler,

0 commit comments

Comments
 (0)