Skip to content

Commit

Permalink
closes facebook#13034 Fixes the ScrollViewMock methods
Browse files Browse the repository at this point in the history
Added lint rule to avoid unresolved identifier error
  • Loading branch information
alvaromb committed Mar 21, 2017
1 parent b3be574 commit fdf7f47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Libraries/Components/ScrollView/__mocks__/ScrollViewMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
* eslint-env jest
*/
'use strict';

Expand All @@ -17,7 +18,9 @@ const requireNativeComponent = require('requireNativeComponent');

const RCTScrollView = requireNativeComponent('RCTScrollView');

class ScrollViewMock extends React.Component {
const ScrollViewComponent = jest.genMockFromModule('ScrollView');

class ScrollViewMock extends ScrollViewComponent {
render() {
return (
<RCTScrollView {...this.props}>
Expand Down

0 comments on commit fdf7f47

Please sign in to comment.