Skip to content

Commit

Permalink
Mock all Touchable* components (jestjs#2069)
Browse files Browse the repository at this point in the history
* mock all Touchable* components

* move arguments into new lines due to linter issues

* add dangling commas
  • Loading branch information
janmonschke authored and cpojer committed Nov 10, 2016
1 parent 2aa3407 commit 8dfb9ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/jest-react-native/src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ jest
.mock('Modal', () => mockReactNative.mockComponent('Modal'))
.mock('View', () => mockReactNative.mockComponent('View'))
.mock('ScrollView', () => mockReactNative.mockComponent('ScrollView'))
.mock(
'TouchableOpacity',
() => mockReactNative.mockComponent('TouchableOpacity'),
)
.mock(
'TouchableHighlight',
() => mockReactNative.mockComponent('TouchableHighlight'),
)
.mock(
'TouchableWithoutFeedback',
() => mockReactNative.mockComponent('TouchableWithoutFeedback'),
)
.mock(
'TouchableNativeFeedback',
() => mockReactNative.mockComponent('TouchableNativeFeedback'),
)
.mock(
'ActivityIndicator',
() => mockReactNative.mockComponent('ActivityIndicator'),
Expand Down

0 comments on commit 8dfb9ad

Please sign in to comment.