Testing Reactive forms
To make sure we build robust and bug-free forms for end users, it is a really good idea to have tests around your forms. It makes the code more resilient and less prone to errors. In this recipe, you'll learn how to test your template-driven forms using unit tests.
Getting ready
The project for this recipe resides in chapter08/start_here/testing-reactive-forms
:
- Open the project in Visual Studio Code.
- Open the terminal and run
npm install
to install the dependencies of the project. - Once done, run
ng serve -o
.This should open the app in a new browser tab, and you should see the app as follows:
Now that we have the app running locally, let's see the steps involved in this recipe in the next section.
How to do it…
We have the Release Logs application that has a Reactive form implemented with some validations...