nextui/plop/component/__tests__/{{componentName}}.test.tsx.hbs
2022-10-02 16:59:13 -03:00

19 lines
541 B
Handlebars

import * as React from "react";
import {render} from "@testing-library/react";
import { {{capitalize componentName}} } from "../src";
describe("{{capitalize componentName}}", () => {
it("should render correctly", () => {
const wrapper = render(<{{capitalize componentName}} />);
expect(() => wrapper.unmount()).not.toThrow();
});
it("ref should be forwarded", () => {
const ref = React.createRef<HTMLDivElement>();
render(<{capitalize componentName}} ref={ref} />);
expect(ref.current).not.toBeNull();
});
});