mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-19 00:44:41 +02:00
18 lines
463 B
TypeScript
18 lines
463 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();
|
|
});
|
|
});
|