import React from 'react'; import { Icon } from '../../dist/offline'; import renderer from 'react-test-renderer'; const iconData = { body: '', width: 24, height: 24, }; describe('Inline attribute', () => { test('boolean true', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.style.verticalAlign).toStrictEqual('-0.125em'); }); test('string', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.style.verticalAlign).toStrictEqual('-0.125em'); }); test('false', () => { const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.style.verticalAlign).toEqual(void 0); }); test('false string', () => { // "false" should be ignored const component = renderer.create( ); const tree = component.toJSON(); expect(tree.props.style.verticalAlign).toEqual(void 0); }); });