Summary

Testing is an important aspect of the application life cycle, and writing test scripts is crucial for application development success. We started with an overview of the frameworks supported by Angular, namely Jasmine and Karma. We learned how to run our tests using the ng test command. Then, we learned how to use the spec files autogenerated by Angular for all the components and services. 

We learned how to write test scripts to test Angular components, built-in directives, services, and routing. We wrote test scripts for built-in directives, such as ngFor, ngIf, ngSwitch, and ngModel. We also covered use cases for testing Angular routing. Then, we created a menu component and wrote test scripts to test various use cases for the menu component.

We also explored testing dependency injection and services. We learned about various use cases and wrote test scripts for Angular services and HTTP calls. 

In the next chapter, we will explore advanced Angular topics, such as custom directives and custom form validations.

Read on!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.230.172