import React from 'react'; import { render } from 'enzyme'; import { primary, valencia } from 'styles/colors'; import Icon from '../index'; import * as icons from '../icons'; const optionalProps = { size: [20, 40], color: [valencia.main, primary.main], }; // TODO: deprecate describe('', () => { Object.entries(icons).forEach(([type, SpecificIcon]) => { it(`<${type}Icon />`, () => { const wrapper = render(); expect(wrapper).toMatchSnapshot(); }); it(``, () => { const wrapper = render(); expect(wrapper).toMatchSnapshot(); }); Object.entries(optionalProps).forEach(([key, dataSet]) => { dataSet.forEach(value => { it(`Icon-${type}-${key}-${value}`, () => { const props = { [key]: value }; const wrapper = render(); expect(wrapper).toMatchSnapshot(); }); }); }); }); });