import React from 'react'; import { InlineIcon } from '../../dist/offline'; import renderer from 'react-test-renderer'; const iconData = { body: '', width: 24, height: 24, }; describe('Dimensions', () => { test('height', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.height).toStrictEqual('48'); expect(tree.props.width).toStrictEqual('48'); }); test('width and height', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.height).toStrictEqual('48'); expect(tree.props.width).toStrictEqual('32'); }); test('auto', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.height).toStrictEqual('24'); expect(tree.props.width).toStrictEqual('24'); }); test('undefined', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.height).toStrictEqual(void 0); expect(tree.props.width).toStrictEqual(void 0); }); });