Skip to content

Instantly share code, notes, and snippets.

@vzaidman
Last active February 7, 2018 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vzaidman/ce04695e67d132bd1870014345699874 to your computer and use it in GitHub Desktop.
Save vzaidman/ce04695e67d132bd1870014345699874 to your computer and use it in GitHub Desktop.
it('renders correctly', () => {
// create an instance of the Link component with page and child text
const linkInstance = (
<Link page="http://www.facebook.com">Facebook</Link>
)
// create a data snapshot of the component
const tree = renderer.create(linkInstance).toJSON()
// compare the sata to the last snapshot
expect(tree).toMatchSnapshot()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment