import React from "react"; import { mount } from "enzyme"; import Loader from "."; const baseProps = { type: "base", color: "black", size: "18px", label: "Loading", }; describe("", () => { it("renders without error", () => { const wrapper = mount(); expect(wrapper).toExist(); }); it("dual-ring type", () => { const wrapper = mount(); expect(wrapper.prop("type")).toEqual("dual-ring"); }); it("rombs type", () => { const wrapper = mount(); expect(wrapper.prop("type")).toEqual("rombs"); }); 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"); }); });