February 2019
Beginner
694 pages
18h 4m
English
React has a similar testing range to the other frameworks that we have covered, and allows for the creation of a component into a DOM specifically set up for the component under test. We can query this DOM to find each of the elements we are looking for, and ensure that they are displayed correctly. We then explored the techniques that React uses in order to set form values when a form is created, and to extract these values when they have been updated. Similar to Jasmine's setFixtures and Angular's TestBed, React provides a library named ReactTestUtils to aid with rendering components into the DOM, and simulating events. React uses Jest as a test runner instead of Karma.
Read now
Unlock full access