diff --git a/docs/example-external.md b/docs/example-external.md index ee534022a..580439b1d 100644 --- a/docs/example-external.md +++ b/docs/example-external.md @@ -4,5 +4,16 @@ title: External Examples sidebar_label: External Examples --- -You can find more react-testing-library examples at -[react-testing-examples.com](https://react-testing-examples.com/jest-rtl/). +## Code Samples + +- You can find more react-testing-library examples at + [react-testing-examples.com](https://react-testing-examples.com/jest-rtl/). + +## Videos + +- [What is React Testing Library?](https://youtu.be/JKOwJUM4_RM) by Scott + Tolinski + + + what is react testing library + diff --git a/docs/react-testing-library/example-intro.md b/docs/react-testing-library/example-intro.md index dbf399867..6a7a4fae1 100644 --- a/docs/react-testing-library/example-intro.md +++ b/docs/react-testing-library/example-intro.md @@ -44,7 +44,11 @@ test('loads and displays greeting', async () => { }) ``` -## Imports +--- + +## Step-By-Step + +### Imports ```jsx // import dependencies @@ -69,8 +73,6 @@ import axiosMock from 'axios' import Fetch from '../fetch' ``` -## Test - ```jsx // automatically unmount and cleanup DOM after the test is finished. afterEach(cleanup) @@ -84,8 +86,8 @@ test('loads and displays greeting', async () => { ### Arrange -The [`render`](./api#render) method renders a React -element into the DOM and returns utility functions for testing the component. +The [`render`](./api#render) method renders a React element into the DOM and +returns utility functions for testing the component. ```jsx const url = '/greeting' diff --git a/docs/react-testing-library/intro.md b/docs/react-testing-library/intro.md index 7404029f2..08b40afe4 100644 --- a/docs/react-testing-library/intro.md +++ b/docs/react-testing-library/intro.md @@ -63,7 +63,11 @@ facilitate testing implementation details). Read more about this in > NOTE: This library is built on top of [`dom-testing-library`](/) which is > where most of the logic behind the queries is. -## What is react-testing-library? +## Video -Have a look at the video below for an explanation.

-[![what is react testing library](https://img.youtube.com/vi/JKOwJUM4_RM/0.jpg)](https://youtu.be/JKOwJUM4_RM 'what is react testing library') +Have a look at the "What is React Testing library?" video below for an +introduction to the library. + + + what is react testing library +