Skip to content

Commit e0af24c

Browse files
committed
[elson] add intro video to react tesing lib
1 parent 3916280 commit e0af24c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/frontend-web-development/react-testing-library.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
## Overview
1717

18-
From: https://testing-library.com/docs/react-testing-library/intro
18+
- From: https://testing-library.com/docs/react-testing-library/intro
19+
- Intro Video: https://youtu.be/JKOwJUM4_RM
1920

2021
### The problem
2122

@@ -141,8 +142,8 @@ We want to display all the items. When I add text into an inbox box, we want to
141142
<input aria-label="filter-text" onChange={this.updateFilterText} />;
142143
{
143144
this.state.data
144-
.filter(text => text.indexOf(this.state.filterText) >= 0)
145-
.map(data => <div key={data}>{data}</div>);
145+
.filter((text) => text.indexOf(this.state.filterText) >= 0)
146+
.map((data) => <div key={data}>{data}</div>);
146147
}
147148
```
148149

@@ -266,15 +267,15 @@ export class Todolist extends React.Component {
266267
}
267268

268269
componentDidMount() {
269-
axios("https://jsonplaceholder.typicode.com/todos").then(res => {
270+
axios("https://jsonplaceholder.typicode.com/todos").then((res) => {
270271
this.setState({ todos: res.data });
271272
});
272273
}
273274

274275
render() {
275276
return (
276277
<div>
277-
{this.state.todos.map(todo => (
278+
{this.state.todos.map((todo) => (
278279
<div key={todo.id}>{todo.title}</div>
279280
))}
280281
</div>

0 commit comments

Comments
 (0)