File tree Expand file tree Collapse file tree 3 files changed +27
-10
lines changed Expand file tree Collapse file tree 3 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,16 @@ title: External Examples
4
4
sidebar_label : External Examples
5
5
---
6
6
7
- You can find more react-testing-library examples at
8
- [ react-testing-examples.com] ( https://react-testing-examples.com/jest-rtl/ ) .
7
+ ## Code Samples
8
+
9
+ - You can find more react-testing-library examples at
10
+ [ react-testing-examples.com] ( https://react-testing-examples.com/jest-rtl/ ) .
11
+
12
+ ## Videos
13
+
14
+ - [ What is React Testing Library?] ( https://youtu.be/JKOwJUM4_RM ) by Scott
15
+ Tolinski
16
+
17
+ <a href =" https://youtu.be/JKOwJUM4_RM " >
18
+ <img width =" 200px " alt =" what is react testing library " src =' https://img.youtube.com/vi/JKOwJUM4_RM/0.jpg ' style =" margin-left : 36px " />
19
+ </a >
Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ test('loads and displays greeting', async () => {
44
44
})
45
45
```
46
46
47
- ## Imports
47
+ ---
48
+
49
+ ## Step-By-Step
50
+
51
+ ### Imports
48
52
49
53
``` jsx
50
54
// import dependencies
@@ -69,8 +73,6 @@ import axiosMock from 'axios'
69
73
import Fetch from ' ../fetch'
70
74
```
71
75
72
- ## Test
73
-
74
76
``` jsx
75
77
// automatically unmount and cleanup DOM after the test is finished.
76
78
afterEach (cleanup)
@@ -84,8 +86,8 @@ test('loads and displays greeting', async () => {
84
86
85
87
### Arrange
86
88
87
- The [ ` render ` ] ( ./api#render ) method renders a React
88
- element into the DOM and returns utility functions for testing the component.
89
+ The [ ` render ` ] ( ./api#render ) method renders a React element into the DOM and
90
+ returns utility functions for testing the component.
89
91
90
92
``` jsx
91
93
const url = ' /greeting'
Original file line number Diff line number Diff line change @@ -63,7 +63,11 @@ facilitate testing implementation details). Read more about this in
63
63
> NOTE: This library is built on top of [ ` dom-testing-library ` ] ( / ) which is
64
64
> where most of the logic behind the queries is.
65
65
66
- ## What is react-testing-library?
66
+ ## Video
67
67
68
- Have a look at the video below for an explanation. <br /><br />
69
- [ ![ what is react testing library] ( https://img.youtube.com/vi/JKOwJUM4_RM/0.jpg )] ( https://youtu.be/JKOwJUM4_RM ' what is react testing library ')
68
+ Have a look at the "What is React Testing library?" video below for an
69
+ introduction to the library.
70
+
71
+ <a href =" https://youtu.be/JKOwJUM4_RM " >
72
+ <img width =" 200px " alt =" what is react testing library " src =' https://img.youtube.com/vi/JKOwJUM4_RM/0.jpg ' style =" margin-left : 0 " />
73
+ </a >
You can’t perform that action at this time.
0 commit comments