Testing React Forms - React Testing Library - React.js Testing Tutorial #8

Опубликовано: 04 Октябрь 2021
на канале: Bruno Antunes
29,822
611

In this video we will learn how to test React Forms using React Testing Library. Our React forms can be implemented using formik or react hook form and our tests will work for both libraries.

The tests will take no assumption on the "library" used, so independently of you using react hook form or formik, those tests will work in both libraries.

GitHub repository: https://github.com/bmvantunes/youtube...
All the videos in this series (React.js Testing Tutorial):    • React.js Unit Testing and Integration...  

Join the channel to support my content:
   / @brunoantunespt  

Video where we built the multi-step form:    • React Multi-Step Form Tutorial: Using...  

Timeline:
00:00 Introduction
00:55 Demo the form we will test
02:58 Test the happy path scenario
14:21 Refactoring
15:35 Test the required fields
16:55 IMPORTANT: toHaveErrorMessage
22:00 Test Min and Max characters using react testing library
25:45 Cross-Step Validation - money field
29:00 What to test next?

Follow me on:
Twitter:   / bmvantunes  
Dev.to: https://dev.to/bmvantunes
Website: https://brunoantunes.net
GitHub: https://github.com/bmvantunes
LinkedIn:   / bmvantunes  

#jest #ReactTestingLibrary #formik


Смотрите видео Testing React Forms - React Testing Library - React.js Testing Tutorial #8 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Bruno Antunes 04 Октябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 29,822 раз и оно понравилось 611 людям.