import React from 'react';
import Link from './Link';
import renderer from 'react-test-renderer';
import snapshot from 'snap-shot'
test.skip('Link changes the class when hovered', () => {
// snapshot does not know how to handle JSX
const component = renderer.create(
<Link page="http://www.facebook.com">Facebook</Link>
);
let tree = component.toJSON();
snapshot(tree)
});
If the test code has JSX, does not work, for example see https://github.com/bahmutov/snap-shot-jest-test/blob/master/Link.test.js - crashes on line
<Link page="http://www.facebook.com">Facebook</Link>