Skip to content

Instantly share code, notes, and snippets.

@hschaeidt
Created December 16, 2016 10:31
Show Gist options
  • Save hschaeidt/0534e948aa8e101f665e9a5d5931bf27 to your computer and use it in GitHub Desktop.
Save hschaeidt/0534e948aa8e101f665e9a5d5931bf27 to your computer and use it in GitHub Desktop.
import React from 'react';
import { shallow } from 'enzyme';
const SampleComp = () => (
<div>
<span>My Component</span>
</div>
);
describe('<SampleComp />', () => {
it('should match the snapshot', () => {
const wrapper = shallow(<SampleComp />);
expect(wrapper.getNodes()).toMatchSnapshot();
});
});
@discrete-javascript
Copy link

Reactlly Cool...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment