import React from "react"; import { mount } from "enzyme"; import Tooltip from "."; import Text from "../text"; describe("", () => { it("renders without error", () => { const wrapper = mount({You tooltip text}); expect(wrapper).toExist(); }); it("Tooltip componentDidUpdate() lifecycle test", () => { const wrapper = mount( {You tooltip text} ).instance(); wrapper.componentDidUpdate(wrapper.props, wrapper.state); expect(wrapper.props).toBe(wrapper.props); }); it("Tooltip componentDidUpdate() lifecycle test", () => { const wrapper = mount( {You tooltip text} ).instance(); wrapper.componentDidUpdate(wrapper.props, wrapper.state); expect(wrapper.props).toBe(wrapper.props); }); 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"); }); });