Testing Props

So far all our lessons have not touched props - although they are some of the simplest things learn when using React Testing Library.

For most typical tests, you will just need to pass them into your render() function like this:

render(
  <YourComponent name="Bob" age={80} />
);

Loading full lesson content & code...

Ready to try running tests for this lesson?