digitransit-ui/test/unit/component/IconWithIcon.test.js
2020-09-17 13:46:26 +03:00

17 lines
553 B
JavaScript

import React from 'react';
import { shallowWithIntl } from '../helpers/mock-intl-enzyme';
import Icon from '../../../app/component/Icon';
import IconWithIcon from '../../../app/component/IconWithIcon';
describe('<IconWithIcon />', () => {
it('should apply the given sub icon shape', () => {
const props = {
img: 'img',
subIcon: 'sub-img',
subIconShape: 'circle',
};
const wrapper = shallowWithIntl(<IconWithIcon {...props} />);
expect(wrapper.find(Icon).at(1).prop('backgroundShape')).to.equal('circle');
});
});