forked from testing-library/native-testing-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.js
41 lines (38 loc) · 1.67 KB
/
configure.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { asyncAct } from '../act-compat';
import { NativeTestEvent } from '../lib/events';
import { configure as configureNTL } from '../lib';
// Make this global for convenience, just like browser events
global.NativeTestEvent = NativeTestEvent;
configureNTL({
asyncWrapper: async cb => {
let result;
await asyncAct(async () => {
result = await cb();
});
return result;
},
// Query lists
coreComponents: [
'react-native/Libraries/Components/ActivityIndicator/ActivityIndicator',
'react-native/Libraries/Components/Button',
'react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid',
'react-native/Libraries/Image/Image',
'react-native/Libraries/Modal/Modal',
'react-native/Libraries/Components/Picker/Picker',
'react-native/Libraries/Components/Pressable/Pressable',
'react-native/Libraries/Components/RefreshControl/RefreshControl',
'react-native/Libraries/Components/SafeAreaView/SafeAreaView',
'react-native/Libraries/Components/ScrollView/ScrollView',
'react-native/Libraries/Components/Switch/Switch',
'react-native/Libraries/Text/Text',
'react-native/Libraries/Components/TextInput/TextInput',
'react-native/Libraries/Components/Touchable/TouchableHighlight',
'react-native/Libraries/Components/Touchable/TouchableNativeFeedback',
'react-native/Libraries/Components/Touchable/TouchableOpacity',
'react-native/Libraries/Components/Touchable/TouchableWithoutFeedback',
'react-native/Libraries/Components/View/View',
],
displayValueComponents: ['TextInput', 'Picker', 'Switch'],
textComponents: ['Button', 'Text', 'TextInput'],
titleComponents: ['Button', 'RefreshControl'],
});