Skip to main content

Angular Unit Testing

  • Chapter
  • First Online:

Abstract

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Adam Freeman

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Freeman, A. (2018). Angular Unit Testing. In: Pro Angular 6. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3649-9_29

Download citation

Publish with us

Policies and ethics