diff --git a/components/icon/__tests__/__snapshots__/index.test.js.snap b/components/icon/__tests__/__snapshots__/index.test.js.snap new file mode 100644 index 0000000000..0e7a3ec4aa --- /dev/null +++ b/components/icon/__tests__/__snapshots__/index.test.js.snap @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Icon should render to a 1`] = ` + +`; diff --git a/components/icon/__tests__/index.test.js b/components/icon/__tests__/index.test.js index accc18f99c..10eb9c6fb0 100644 --- a/components/icon/__tests__/index.test.js +++ b/components/icon/__tests__/index.test.js @@ -1,28 +1,12 @@ import React from 'react'; -import TestUtils from 'react-dom/test-utils'; +import { render } from 'enzyme'; import Icon from '..'; -class Wrapper extends React.Component { - render() { - return this.props.children; - } -} - describe('Icon', () => { - let icon; - let iconNode; - - beforeEach(() => { - icon = TestUtils.renderIntoDocument( - - ); - iconNode = TestUtils.findRenderedDOMComponentWithTag(icon, 'I'); - }); - it('should render to a ', () => { - expect(iconNode.tagName).toBe('I'); - expect(iconNode.className).toContain('my-icon-classname'); - expect(iconNode.className).toContain('anticon'); - expect(iconNode.className).toContain('anticon-appstore'); + const wrapper = render( + + ); + expect(wrapper).toMatchSnapshot(); }); });