You have an Angular service that makes HTTP requests. During testing, you want to ensure that your service handles errors correctly. Which tool or technique would you use to simulate an HTTP error response?

  • Angular HttpClient Mocking
  • Angular TestBed
  • Jasmine Spies
  • Protractor End-to-End Testing
To simulate an HTTP error response during testing, you can use Angular HttpClient Mocking, which allows you to control HTTP responses in tests.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *