Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Testing react components - Repos.test.tsx
import { fireEvent, render, screen } from "@testing-library/react";
import Repos from "./Repos";
test("renders user's repos", async () => {
render(<Repos />);
const button = screen.getByText(/Get repos/i);;
const txtRepo = await screen.findByText(/boysenberry/i);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment