mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
4146efa810
close #20090
20 lines
492 B
JavaScript
20 lines
492 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import Tree from '../index';
|
|
|
|
const { TreeNode } = Tree;
|
|
|
|
describe('Tree', () => {
|
|
it('icon of TreeNode should put inside line when showLine is true', () => {
|
|
const wrapper = mount(
|
|
<Tree showLine>
|
|
<TreeNode icon="icon" key="0-0">
|
|
<TreeNode icon="icon" key="0-0-0" />
|
|
<TreeNode key="0-0-1" />
|
|
</TreeNode>
|
|
</Tree>,
|
|
);
|
|
expect(wrapper.render()).toMatchSnapshot();
|
|
});
|
|
});
|