{"version":"1.0","type":"rich","title":"Gist 159a8117261c02868bf3bb34f860ab9c","description":"This example shows unit tests for an Angular `SampleService` that fetches airport data from a remote API. The service exposes two methods: `fetchAll$` returns a sorted list of airports, while `fetchByIATA$` retrieves a single airport by its IATA code. The tests use Angular’s `HttpClientTestingModule` and `HttpTestingController` to mock HTTP requests and flush dummy JSON data. The code verifies that the service correctly parses and orders the response, relying on RxJS observables and Angular’s dependency injection for testability.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-159a8117261c02868bf3bb34f860ab9c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}