Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should render with props', () => {
const wrapper = shallow(
{panel1.content}
{panel2.content}
{panel3.content}
);
const cardElement = wrapper.find(Card.Content);
expect(cardElement).to.have.length(1);
const panelElements = cardElement.find(Accordion.Panel);
expect(panelElements).to.have.length(3);
const panelElement1 = panelElements.at(0);
expect(panelElement1.prop('id')).to.equal('1');
expect(panelElement1.prop('onClick')).to.be.a('function');
const panelElement2 = panelElements.at(1);
expect(panelElement2.prop('id')).to.equal('2');
expect(panelElement2.prop('onClick')).to.be.a('function');
const panelElement3 = panelElements.at(2);
expect(panelElement3.prop('id')).to.equal('3');
expect(panelElement3.prop('onClick')).to.be.a('function');
it('should render with defaults', () => {
const wrapper = shallow(
{panel1.content}
);
const cardElement = wrapper.find(Card.Content);
expect(cardElement).to.have.length(1);
expect(cardElement.children()).to.have.length(1);
});