mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 11:58:41 +08:00
20 lines
494 B
JavaScript
20 lines
494 B
JavaScript
import test from 'ava';
|
|
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import Icon from '../components/icon/index.tsx';
|
|
|
|
let iconNode;
|
|
|
|
test.beforeEach(() => {
|
|
iconNode = shallow(
|
|
<Icon type="appstore" className="my-icon-classname" />
|
|
);
|
|
});
|
|
|
|
test('should render to a <i class="xxx"></i>', (t) => {
|
|
t.is(iconNode.type(), 'i');
|
|
t.true(iconNode.hasClass('my-icon-classname'));
|
|
t.true(iconNode.hasClass('anticon'));
|
|
t.true(iconNode.hasClass('anticon-appstore'));
|
|
});
|