import React from "react"; import { render } from "@testing-library/react"; import { createSerializer } from "@emotion/jest"; import GridList from "../components/GridList"; expect.addSnapshotSerializer(createSerializer()); describe("GridList", () => { it("renders default", () => { const { asFragment } = render(
  • list item
  • list item
  • ); expect(asFragment()).toMatchSnapshot(); }); it("renders with all props", () => { const { asFragment } = render(
  • list item
  • list item
  • ); expect(asFragment()).toMatchSnapshot(); }); it("renders with responsive props", () => { const { asFragment } = render(
  • list item
  • list item
  • ); expect(asFragment()).toMatchSnapshot(); }); });