Files
ota-admin-portal/src/components/DeleteConfirmation/index.test.jsx
2022-09-28 09:01:19 -07:00

21 lines
572 B
JavaScript

jest.mock("../Contexts/UserContext");
import React from "react";
import { render, cleanup } from "@testing-library/react";
import DeleteConfirmation from "./index";
import addSnapshotSerializer from "../../utils/snapshot";
describe("Delete Confirmation Modal", () => {
beforeAll(() => {
addSnapshotSerializer(expect);
});
it("Should render", () => {
const { container } = render(
<DeleteConfirmation open={true} close={()=>{}} message="Test Message" deleteFunction={()=>{}}/>
);
expect(container).toMatchSnapshot();
cleanup();
});
});