-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aksonov
committed
May 29, 2018
1 parent
300999d
commit 92c3ff1
Showing
4 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// mock autofocus: https://github.com/facebook/jest/issues/3707#issuecomment-311169259 | ||
export default jest.mock('TextInput', () => { | ||
const RealComponent = require.requireActual('TextInput'); | ||
const React = require('React'); | ||
export default jest.doMock('TextInput', () => { | ||
const RealComponent = require.requireActual('TextInput') | ||
const React = require('React') | ||
class TextInput extends React.Component { | ||
render() { | ||
delete this.props.autoFocus; | ||
return React.createElement('TextInput', this.props, this.props.children); | ||
delete this.props.autoFocus | ||
return React.createElement('TextInput', this.props, this.props.children) | ||
} | ||
} | ||
TextInput.propTypes = RealComponent.propTypes; | ||
return TextInput; | ||
}); | ||
TextInput.propTypes = RealComponent.propTypes | ||
return TextInput | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
jest.mock('VirtualizedList', () => { | ||
const RealComponent = require.requireActual('VirtualizedList'); | ||
const React2 = require('React'); | ||
jest.doMock('VirtualizedList', () => { | ||
const RealComponent = require.requireActual('VirtualizedList') | ||
const React2 = require('React') | ||
class VirtualizedList extends React2.Component { | ||
render() { | ||
delete this.props.getScrollableNode; | ||
return React2.createElement('VirtualizedList', this.props, this.props.children); | ||
delete this.props.getScrollableNode | ||
return React2.createElement('VirtualizedList', this.props, this.props.children) | ||
} | ||
} | ||
VirtualizedList.propTypes = RealComponent.propTypes; | ||
return VirtualizedList; | ||
}); | ||
VirtualizedList.propTypes = RealComponent.propTypes | ||
return VirtualizedList | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters