© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro Angular https://doi.org/10.1007/978-1-4842-8176-5_29

29. Angular Unit Testing

Adam Freeman1  
(1)
London, UK
 
In this chapter, I describe the tools that Angular provides for unit testing components and directives. Some Angular building blocks, such as pipes and services, can be readily tested in isolation using the basic testing tools that I set up at the start of the chapter. Components (and, to a lesser extent, directives) have complex interactions with their host elements and with their template content and require special features. Table 29-1 puts Angular unit testing in context.
Table 29-1

Putting Angular Unit Testing Context

Question

Answer

Get Pro Angular: Build Powerful and Dynamic Web Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.