Function
makeRequestAndExpectOne
(
url: string,
body: string,
options: HttpTransferCacheOptions | boolean = true,
)
Source from the content-addressed store, hash-verified
| 37 | class SomeComponent {} |
| 38 | |
| 39 | function makeRequestAndExpectOne( |
| 40 | url: string, |
| 41 | body: string, |
| 42 | options: HttpTransferCacheOptions | boolean = true, |
| 43 | ): void { |
| 44 | TestBed.inject(HttpClient).get(url, {transferCache: options}).subscribe(); |
| 45 | TestBed.inject(HttpTestingController).expectOne(url).flush(body); |
| 46 | } |
| 47 | |
| 48 | function makeRequestAndExpectNone( |
| 49 | url: string, |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…