Skip to content

Commit 0852239

Browse files
authored
Update part5c.md typos
Removed incorrect placement of commas. Added missing 'to' to sentence.
1 parent 5e11e3d commit 0852239

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/5/en/part5c.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ Tests get access to the input field using the function [getByRole](https://testi
498498

499499
The method [type](https://testing-library.com/docs/user-event/utility#type) of the userEvent is used to write text to the input field.
500500

501-
The first test expectation ensures, that submitting the form calls the _createNote_ method.
502-
The second expectation checks, that the event handler is called with the right parameters - that a note with the correct content is created when the form is filled.
501+
The first test expectation ensures that submitting the form calls the _createNote_ method.
502+
The second expectation checks that the event handler is called with the right parameters - that a note with the correct content is created when the form is filled.
503503

504504
### About finding the elements
505505

@@ -762,7 +762,7 @@ We chose to concentrate on making end-to-end tests to test the whole application
762762

763763
Jest offers a completely different alternative to "traditional" testing called [snapshot](https://facebook.github.io/jest/docs/en/snapshot-testing.html) testing. The interesting feature of snapshot testing is that developers do not need to define any tests themselves, it is simple enough to adopt snapshot testing.
764764

765-
The fundamental principle is to compare the HTML code defined by the component after it has changed the HTML code that existed before it was changed.
765+
The fundamental principle is to compare the HTML code defined by the component after it has changed to the HTML code that existed before it was changed.
766766

767767
If the snapshot notices some change in the HTML defined by the component, then either it is new functionality or a "bug" caused by accident. Snapshot tests notify the developer if the HTML code of the component changes. The developer has to tell Jest if the change was desired or undesired. If the change to the HTML code is unexpected, it strongly implies a bug, and the developer can become aware of these potential issues easily thanks to snapshot testing.
768768

0 commit comments

Comments
 (0)