Skip to content

Instantly share code, notes, and snippets.

@bharat-tiwari
Created November 22, 2019 14:30
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 bharat-tiwari/b0e718970fafa2b8788763c81f0d3001 to your computer and use it in GitHub Desktop.
Save bharat-tiwari/b0e718970fafa2b8788763c81f0d3001 to your computer and use it in GitHub Desktop.
Unit tests for Header component
import React from 'react';
import Header from './header';
import renderer from 'react-test-renderer';
describe('Header', () => {
it('should render correctly', () => {
const header = renderer.create(<Header title="Test" />).toJSON;
expect(header).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment