Skip to content

Instantly share code, notes, and snippets.

@elaich
Last active May 28, 2019 09:27
Show Gist options
  • Save elaich/5edfd49b0733a0bc797504c8ec1c8873 to your computer and use it in GitHub Desktop.
Save elaich/5edfd49b0733a0bc797504c8ec1c8873 to your computer and use it in GitHub Desktop.
A TestCase: when we allow props of a component to pass other components.
const props = {
component: <Text text="Something" />,
}
it('Gives the right property', () => {
const wrapper = render(props);
expect(wrapper.props()).toMatchObject(props); // This fails with no visual differences between the expected and received.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment