File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,11 @@ test('event with multiple handler parameters', () => {
168
168
test ( 'should not fire on disabled TouchableOpacity' , ( ) => {
169
169
const handlePress = jest . fn ( ) ;
170
170
const screen = render (
171
- < TouchableOpacity onPress = { handlePress } disabled = { true } >
172
- < Text > Trigger</ Text >
173
- </ TouchableOpacity >
171
+ < View >
172
+ < TouchableOpacity onPress = { handlePress } disabled = { true } >
173
+ < Text > Trigger</ Text >
174
+ </ TouchableOpacity >
175
+ </ View >
174
176
) ;
175
177
176
178
fireEvent . press ( screen . getByText ( 'Trigger' ) ) ;
@@ -180,9 +182,11 @@ test('should not fire on disabled TouchableOpacity', () => {
180
182
test ( 'should not fire on disabled Pressable' , ( ) => {
181
183
const handlePress = jest . fn ( ) ;
182
184
const screen = render (
183
- < Pressable onPress = { handlePress } disabled = { true } >
184
- < Text > Trigger</ Text >
185
- </ Pressable >
185
+ < View >
186
+ < Pressable onPress = { handlePress } disabled = { true } >
187
+ < Text > Trigger</ Text >
188
+ </ Pressable >
189
+ </ View >
186
190
) ;
187
191
188
192
fireEvent . press ( screen . getByText ( 'Trigger' ) ) ;
You can’t perform that action at this time.
0 commit comments