Skip to content

Instantly share code, notes, and snippets.

@Eightyplus
Created November 12, 2018 08:53
Show Gist options
  • Save Eightyplus/f5cc7bc0963e1944de8de45b94f0e4f7 to your computer and use it in GitHub Desktop.
Save Eightyplus/f5cc7bc0963e1944de8de45b94f0e4f7 to your computer and use it in GitHub Desktop.
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