2021-06-14 11:29:03 +02:00
|
|
|
import { render } from "@testing-library/react";
|
|
|
|
import App, { IAppProps } from "../../components/app";
|
|
|
|
|
|
|
|
const props: IAppProps = {
|
|
|
|
name: "App Test",
|
|
|
|
icon: "bug_report",
|
|
|
|
url: "#",
|
|
|
|
displayURL: "test",
|
|
|
|
newTab: false,
|
|
|
|
};
|
|
|
|
|
2021-06-14 13:17:31 +02:00
|
|
|
it("App snapshot test", () => {
|
2021-06-14 11:29:03 +02:00
|
|
|
const { asFragment } = render(
|
|
|
|
<App
|
|
|
|
name={props.name}
|
|
|
|
icon={props.icon}
|
|
|
|
url={props.url}
|
|
|
|
displayURL={props.displayURL}
|
|
|
|
newTab={props.newTab}
|
|
|
|
/>,
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(asFragment).toMatchSnapshot();
|
|
|
|
});
|