JEST

React Testing Library

Screenshot 2026-01-21 at 9.11.12 PM.png

App.test.js

import {render, screen} from "@testing-library/react";
import App from "./App";

test("renders a link that points to webpage", () => {
	render(<App/>);
	const linkElement = screen.getByText("Little Lemon Restaurant"); // fails bc app says "Little Orange Restaurant"
	expect(linkElement).toBeInTheDocument();
});

form testing example