MetaPhase-Consulting/State-TalentMAP

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

Summary

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

describe('BidListComponent', () => {
  it('is defined', () => {
    const wrapper = shallow(<BidList.WrappedComponent bids={bidListObject.results} />);
    expect(wrapper).toBeDefined();
  });

  it('matches snapshot', () => {
    const wrapper = shallow(<BidList.WrappedComponent bids={bidListObject.results} />);
    expect(toJSON(wrapper)).toMatchSnapshot();
  });

  it('matches snapshot when there are no bids', () => {
    const wrapper = shallow(<BidList.WrappedComponent bids={[]} />);
    expect(toJSON(wrapper)).toMatchSnapshot();
  });
});