mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-13 11:40:25 +02:00
refactor(starter): upgrade and move to typescript
This commit is contained in:
@@ -14,15 +14,16 @@ describe("Comments", () => {
|
||||
mockedStaticQuery.mockImplementationOnce(({ render }) =>
|
||||
render(mocks.siteMetadata),
|
||||
);
|
||||
|
||||
mockedUseStaticQuery.mockReturnValue(mocks.siteMetadata);
|
||||
});
|
||||
|
||||
const props = {
|
||||
postTitle: "test",
|
||||
postSlug: "/test",
|
||||
};
|
||||
|
||||
it("renders correctly", () => {
|
||||
const props = {
|
||||
postTitle: mocks.markdownRemark.frontmatter.title,
|
||||
postSlug: mocks.markdownRemark.fields.slug,
|
||||
};
|
||||
|
||||
const tree = renderer.create(<Comments {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
Reference in New Issue
Block a user