Files
ota-admin-portal/src/components/GeneralConfirmation/index.test.jsx
2023-05-23 17:16:46 -04:00

21 lines
589 B
JavaScript

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