refactor(starter): upgrade and move to typescript

This commit is contained in:
Alexander Shelepenok
2022-04-16 14:25:55 +00:00
parent 67ebabbaac
commit 50a99f57f7
156 changed files with 5350 additions and 7173 deletions

View File

@@ -2,10 +2,15 @@ import React from "react";
import renderer from "react-test-renderer";
import { Content } from "@/components/Post/Content";
import * as mocks from "@/mocks";
describe("Content", () => {
it("renders correctly", () => {
const props = { title: "test", body: "<p>test</p>" };
const props = {
title: mocks.markdownRemark.frontmatter.title,
body: mocks.markdownRemark.html,
};
const tree = renderer.create(<Content {...props} />).toJSON();
expect(tree).toMatchSnapshot();
});