mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-05 16:30:37 +02:00
17 lines
553 B
JavaScript
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');
|
|
});
|
|
});
|