MetaPhase-Consulting/State-TalentMAP

View on GitHub
src/Components/ProfileDashboard/SectionHeader/SectionHeader.test.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import { shallow } from 'enzyme';
import toJSON from 'enzyme-to-json';
import SectionHeader from './SectionHeader';

describe('SectionHeaderComponent', () => {
  const props = {
    title: 'Title',
    buttonText: 'click me',
    icon: 'clock-o',
  };

  it('is defined', () => {
    const wrapper = shallow(<SectionHeader {...props} />);
    expect(wrapper).toBeDefined();
  });

  it('matches snapshot', () => {
    const wrapper = shallow(<SectionHeader {...props} />);
    expect(toJSON(wrapper)).toMatchSnapshot();
  });
});