Angular Testing In Depth: HTTP Services

When we write a web application, most of the time it has a backend. The most straightforward way to communicate with the backend is with HTTP requests. These requests are crucial for the application, so we need to test them. More importantly, these tests need to be isolated from the outside world. In this article I will show you how to test your requests properly and elegantly.

This article is the second part of a series in which I share my experiences testing different building blocks of an Angular application. It relies heavily on Dependency Injection based testing and it is recommended that you read the first part if you are not familiar with the concepts.

  • Services
  • HTTP Services (this article)
  • Components
  • Pipes
  • Routing

Read on!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.