Created
April 27, 2020 07:51
-
-
Save pavermakov/3e7a14a3efef7ef25cd9aab3a9cc27c8 to your computer and use it in GitHub Desktop.
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
// Calling .blur() in the test renderer environment is not supported. Instead, mock out your | |
// components that use findNodeHandle with replacements that don't rely on the native environment. | |
jest.mock("TextInput", () => { | |
const RealComponent = require.requireActual("TextInput"); | |
const React = require("react"); | |
// eslint-disable-next-line react/prefer-stateless-function | |
class TextInput extends React.Component { | |
render() { | |
return React.createElement("TextInput", this.props, this.props.children); | |
} | |
} | |
TextInput.propTypes = RealComponent.propTypes; | |
return TextInput; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment