Skip to content

Instantly share code, notes, and snippets.

@takethefake
Created February 8, 2019 10:06
Show Gist options
  • Save takethefake/f254e8c5befb7e289d9dadeeb540033c to your computer and use it in GitHub Desktop.
Save takethefake/f254e8c5befb7e289d9dadeeb540033c to your computer and use it in GitHub Desktop.
it('renders correctly', () => {
const tree = renderer
.create(<Link page="https://prettier.io">Prettier</Link>)
.toJSON();
expect(tree).toMatchInlineSnapshot();
});
// Will be changed after one Jest run into:
it('renders correctly', () => {
const tree = renderer
.create(<Link page="https://prettier.io">Prettier</Link>)
.toJSON();
expect(tree).toMatchInlineSnapshot(`
<a
className="normal"
href="https://prettier.io"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
>
Prettier
</a>
`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment