import React from "react";
import { render } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { createSerializer } from "@emotion/jest";
import { Textarea } from "../";
import { InputAppearance } from "../../shared/types/inputAppearance";
expect.addSnapshotSerializer(createSerializer());
describe("Textarea", () => {
describe("should render", () => {
it("all appearances", () => {
Object.keys(InputAppearance).forEach(appearance => {
const { asFragment, unmount } = render(
);
expect(asFragment()).toMatchSnapshot();
unmount();
});
});
it("string inputLabel", () => {
const { getByText } = render(
);
getByText("Test Input");
});
it("node as inputLabel", () => {
const { getByText } = render(