import * as React from "react";
import { render, screen } from "@testing-library/react";
import { DialogRoot } from "./DialogRoot";
import { DialogClose } from "./DialogClose";
const customRender = (component) => {
return render({component});
};
describe("DialogClose", () => {
test("renders visibly into the document", () => {
customRender();
expect(screen.getByRole("button")).toBeVisible();
});
test("honors asChild prop", () => {
customRender(
);
expect(screen.getByText("Cancel")).toBeVisible();
});
});