In this video I show you how to test lists in React.js! We'll take a test driven development (TDD) approach to first focus on writing the tests, then the implementation. I also cover strategies to write the code for accessibility as well as various techniques to make it all better!
00:00 - Intro
00:16 - Overview of files and code
00:45 - Testing for empty states
02:00 - Implementing empty state
03:01 - Testing for rendering items
04:59 - Testing for list order
06:03 - Querying by ARIA roles
08:04 - Asserting list lengths
08:39 - Asserting list order
09:35 - Implement list functionality
10:18 - Implementing sorting
11:47 - Utilizing snapshots
12:45 - Providing roles manually
13:45 - Using data-testid instead
14:53 - Some callouts
16:29 - Conclusion
Watch video React JS Testing Lists (TDD) | React Testing Library online without registration, duration hours minute second in high quality. This video was added by user Marius Espejo 30 January 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,649 once and liked it 118 people.