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

@@ -17,24 +17,8 @@ describe("Post", () => {
mockedUseStaticQuery.mockReturnValue(mocks.siteMetadata);
});
const props = {
post: {
id: "test-123",
html: "<p>test</p>",
fields: {
slug: "/test",
categorySlug: "/test-category",
tagSlugs: ["/test_0", "/test_1"],
},
frontmatter: {
date: "2016-09-01",
tags: ["test_0", "test_1"],
title: "test",
},
},
};
it("renders correctly", () => {
const props = { post: mocks.markdownRemark };
const tree = renderer.create(<Post {...props} />).toJSON();
expect(tree).toMatchSnapshot();
});