Concept
Testing Library renders a component into a real DOM and lets you interact with it the way a user would. Tests then check behaviour and output, not implementation details like state variables.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Rendering in tests doing its job.
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
test("increments when clicked", async () => {
render(<Counter />);
await userEvent.click(screen.getByRole("button", { name: /0/ }));
expect(screen.getByRole("button")).toHaveTextContent("1");
});Asserting on internal state or calling component methods. Those tests break on every refactor and pass when the UI is wrong. Assert on what the user sees.
Your roadmap puts these before Rendering in tests, unless you already know them.
Once a session shows you understand Rendering in tests, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Rendering in tests.