alxshelepenok/gatsby-starter-lumen

View on GitHub
src/components/Post/Content/Content.test.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from "react";

import { Content } from "@/components/Post/Content";
import * as mocks from "@/mocks";
import { testUtils } from "@/utils";

describe("Content", () => {
  test("renders correctly", () => {
    const props = {
      title: mocks.markdownRemark.frontmatter.title,
      body: mocks.markdownRemark.html,
    };

    const tree = testUtils
      .createSnapshotsRenderer(<Content {...props} />)
      .toJSON();
    expect(tree).toMatchSnapshot();
  });
});