YUNOVA · Angular · Module 9: Testing Angular apps
Testing services and HTTP calls
Testing services and HTTP calls
Key points
- Services can be tested directly or injected through TestBed.
- HttpTestingController lets a test answer HTTP requests with fake data.
- Call verify() so no unexpected requests are left open.