Skip to content

Instantly share code, notes, and snippets.

@muscaiu
Last active January 29, 2019 12:58
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 muscaiu/0c66dea45961237382dda631225e1a81 to your computer and use it in GitHub Desktop.
Save muscaiu/0c66dea45961237382dda631225e1a81 to your computer and use it in GitHub Desktop.
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Bar from '../Bar';
describe('Bar', () => {
it('should render properly', () => {
const data = 'fake';
const wrapper = shallow(
<Bar data={data} />
);
console.log('wrapper:', wrapper.debug())
expect(toJson(wrapper)).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment