28 lines
667 B
JavaScript
28 lines
667 B
JavaScript
import React from "react";
|
|
import { render, waitFor } from "@testing-library/react";
|
|
|
|
import DownloadCerts from "./DownloadCerts";
|
|
import addSnapshotSerializer from "../../../utils/snapshot";
|
|
|
|
describe("DownloadCerts", () => {
|
|
beforeAll(() => {
|
|
global.URL.createObjectURL = jest.fn();
|
|
global.URL.revokeObjectURL = jest.fn();
|
|
addSnapshotSerializer(expect);
|
|
});
|
|
|
|
it("Render", async () => {
|
|
const { container } = render(
|
|
<DownloadCerts
|
|
vin={"TESTVIN"}
|
|
publicCert={"PUBLIC"}
|
|
privateCert={"PRIVATE"}
|
|
/>
|
|
);
|
|
await waitFor(() => {
|
|
/* render */
|
|
});
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
});
|