mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-20 15:10:15 +02:00
refactor(starter): upgrade and move to typescript
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
Reference in New Issue
Block a user