
Angular Cookbook
By :

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.
The project for this recipe resides in chapter08/start_here/testing-reactive-forms
:
npm install
to install the dependencies of the project. ng serve -o
. This should open the app in a new browser tab, and you should see the app as follows:
Figure 8.19 – The Testing Reactive Forms app running on http://localhost:4200
Now that we have the app running locally, let's see the steps involved in this recipe in the next section.
We have the Release Logs application that has a Reactive form implemented with some validations...