import React from "react"; import { mount } from "enzyme"; import TreeMenu from "."; import TreeNode from "./sub-components/tree-node"; describe("", () => { it("renders without error", () => { const wrapper = mount( ); expect(wrapper).toExist(); }); it("accepts id", () => { const wrapper = mount( ); expect(wrapper.prop("id")).toEqual("testId"); }); it("accepts className", () => { const wrapper = mount( ); expect(wrapper.prop("className")).toEqual("test"); }); /* it("accepts style", () => { const wrapper = mount( ); expect(wrapper.getDOMNode().style).toHaveProperty("color", "red"); }); */ it("accepts isFullFillSelection", () => { const wrapper = mount( ); expect(wrapper.prop("isFullFillSelection")).toEqual(false); }); it("accepts gapBetweenNodes and gapBetweenNodesTablet", () => { const wrapper = mount( ); expect(wrapper.prop("gapBetweenNodes")).toEqual("22"); expect(wrapper.prop("gapBetweenNodesTablet")).toEqual("24"); }); it("accepts isEmptyRootNode", () => { const wrapper = mount( ); expect(wrapper.prop("isEmptyRootNode")).toEqual(true); }); });