- const wrapper = mount(<ProjectTree projects={[project]} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
-
- expect(wrapper.find(ListItemIcon)).toHaveLength(1);
- });
-
- it("should render 2 ListItemIcons", () => {
- const project: Array<TreeItem<Project>> = [
- {
- data: {
- name: "sample name",
- createdAt: "2018-06-12",
- modifiedAt: "2018-06-13",
- uuid: "uuid",
- ownerUuid: "ownerUuid",
- href: "href",
- kind: 'example'
- },
- id: "3",
- open: false,
- active: true,
- status: 1
- },
- {
- data: {
- name: "sample name",
- createdAt: "2018-06-12",
- modifiedAt: "2018-06-13",
- uuid: "uuid",
- ownerUuid: "ownerUuid",
- href: "href",
- kind: 'example'
- },
- id: "3",
- open: false,
- active: true,
- status: 1
- }
- ];
- const wrapper = mount(<ProjectTree projects={project} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
+ const wrapper = mount(<ProjectTree
+ projects={[project]}
+ toggleOpen={jest.fn()}
+ toggleActive={jest.fn()}
+ onContextMenu={jest.fn()} />);