import React from 'react';
import { View } from 'react-native';
import { shallow } from 'enzyme';
import MultiselectListItem from './MultiselectListItem';
describe('MultiselectListItem', () => {
it('should render correctly', () => {
const wrapper = shallow(
,
);
expect(wrapper).toMatchSnapshot();
});
it('should be checked when selected', () => {
const wrapper = shallow(
,
);
const checkboxComponent = wrapper.childAt(0);
const isSelected = checkboxComponent.props().isSelected;
expect(isSelected).toBe(true);
});
it('should not be checked when not selected', () => {
const wrapper = shallow(
,
);
const checkboxComponent = wrapper.childAt(0);
const isSelected = checkboxComponent.props().isSelected;
expect(isSelected).toBe(false);
});
});