Skip to content

Commit 53112f1

Browse files
authored
Merge pull request #1885 from ace4port/patch-1
Update 5c.md
2 parents 5d9d727 + 0afd140 commit 53112f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/5/en/part5c.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ The second expectation checks, that the event handler is called with the right p
497497

498498
### About finding the elements
499499

500-
Let us assume that the form would have two input fields
500+
Let us assume that the form has two input fields
501501

502502
```js
503503
const NoteForm = ({ createNote }) => {
@@ -666,7 +666,7 @@ test('renders content', () => {
666666
})
667667
```
668668

669-
Command _getByText_ looks for an element that has exactly the text that it has as parameter, and nothing more. If we want to look for element that <i>contains</i> the text, we could use a extra option:
669+
Command _getByText_ looks for an element that has exactly the **same text** that it has as parameter, and nothing more. If we want to look for element that <i>contains</i> the text, we could use a extra option:
670670

671671
```js
672672
const element = screen.getByText(
@@ -687,15 +687,15 @@ There are situation where yet another form of the command _queryByText_ is usefu
687687
We could eg. use the command to ensure that something <i>is not rendered</i> to the component:
688688

689689
```js
690-
test('renders no shit', () => {
690+
test('does not render this', () => {
691691
const note = {
692692
content: 'This is a reminder',
693693
important: true
694694
}
695695

696696
render(<Note note={note} />)
697697

698-
const element = screen.queryByText('do not want this shit to be rendered')
698+
const element = screen.queryByText('do not want this thing to be rendered')
699699
expect(element).toBeNull()
700700
})
701701
```

0 commit comments

Comments
 (0)