MCPcopy Create free account
hub / github.com/angular/angular / makeRequestAndExpectOne

Function makeRequestAndExpectOne

packages/platform-browser/test/hydration_spec.ts:40–47  ·  view source on GitHub ↗
(
    url: string,
    body: string,
    options: HttpTransferCacheOptions | boolean = true,
  )

Source from the content-addressed store, hash-verified

38 class SomeComponent {}
39
40 function makeRequestAndExpectOne(
41 url: string,
42 body: string,
43 options: HttpTransferCacheOptions | boolean = true,
44 ): void {
45 TestBed.inject(HttpClient).get(url, {transferCache: options}).subscribe();
46 TestBed.inject(HttpTestingController).expectOne(url).flush(body);
47 }
48
49 function makeRequestAndExpectNone(
50 url: string,

Callers 1

hydration_spec.tsFile · 0.70

Calls 5

expectOneMethod · 0.80
subscribeMethod · 0.65
getMethod · 0.65
injectMethod · 0.65
flushMethod · 0.45

Tested by

no test coverage detected