mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-02-05 18:12:29 +01:00
20 lines
477 B
TypeScript
20 lines
477 B
TypeScript
import React from "react";
|
|
import renderer from "react-test-renderer";
|
|
|
|
import { Page } from "@/components/Page";
|
|
import * as mocks from "@/mocks";
|
|
|
|
describe("Page", () => {
|
|
it("renders correctly", () => {
|
|
const props = {
|
|
children: mocks.markdownRemark.html,
|
|
title: mocks.markdownRemark.frontmatter.title,
|
|
};
|
|
|
|
const tree = renderer
|
|
.create(<Page {...props}>{props.children}</Page>)
|
|
.toJSON();
|
|
expect(tree).toMatchSnapshot();
|
|
});
|
|
});
|