import React from "react"; import { mount } from "enzyme"; import Link from "."; const baseProps = { type: "page", color: "black", href: "https://github.com", }; describe("", () => { it("renders without error", () => { const wrapper = mount(link); expect(wrapper).toExist(); }); it("with isBold prop", () => { const wrapper = mount(); expect(wrapper.prop("isBold")).toEqual(true); }); it("with isHovered prop", () => { const wrapper = mount(); expect(wrapper.prop("isHovered")).toEqual(true); }); it("with isSemitransparent prop", () => { const wrapper = mount(); expect(wrapper.prop("isSemitransparent")).toEqual(true); }); it("with type prop action", () => { const wrapper = mount(); expect(wrapper.prop("type")).toEqual("action"); }); 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"); }); });