Skip to content

Instantly share code, notes, and snippets.

@Clarity-89
Created September 15, 2022 14:37
Show Gist options
  • Save Clarity-89/0b07115ba705eb15296c0af5468e8c42 to your computer and use it in GitHub Desktop.
Save Clarity-89/0b07115ba705eb15296c0af5468e8c42 to your computer and use it in GitHub Desktop.
import { render, screen } from "@testing-library/react";
import React from "react";
import { ListPage } from "./ListPage";
describe("ListPage", () => {
it("renders without breaking", () => {
render(<ListPage />);
expect(
screen.getByRole("heading", { name: "List of items" })
).toBeInTheDocument();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment