Created
November 12, 2018 08:53
-
-
Save Eightyplus/f5cc7bc0963e1944de8de45b94f0e4f7 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
import relay from 'react-relay'; | |
jest.mock('react-relay'); | |
const mockQueryRenderer = props => { | |
return class QueryRendererMock extends Component { | |
render() { | |
return this.props.render({ | |
props: { | |
...props | |
} | |
}); | |
} | |
} | |
} | |
relay.QueryRenderer = mockQueryRenderer( define you props here); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment