import React from "react";
import { mount } from "enzyme";
import Label from ".";
const baseProps = {
text: "First name:",
title: "first name",
htmlFor: "firstNameField",
display: "block",
};
describe("", () => {
it("renders without error", () => {
const wrapper = mount();
expect(wrapper).toExist();
});
it("display error", () => {
const wrapper = mount();
expect(wrapper.prop("error")).toBe(true);
});
it("display required", () => {
const wrapper = mount();
expect(wrapper.prop("isRequired")).toBe(true);
});
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");
});
});