Skip to content

Instantly share code, notes, and snippets.

@tidusia
Created January 30, 2018 20:25
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 tidusia/f69096d94184eb925e929b881c90e5ec to your computer and use it in GitHub Desktop.
Save tidusia/f69096d94184eb925e929b881c90e5ec to your computer and use it in GitHub Desktop.
Medium Snapshot overkill - Simple AppBar snapshot
import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
import AppBar from '../';
describe('<AppBar />', () => {
const renderer = new ShallowRenderer();
it('should match snapshot without props', () => {
renderer.render(<AppBar />);
const tree = renderer.getRenderOutput();
expect(tree).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment