MCPcopy
hub / github.com/angular/angular / makeRequestAndExpectOne

Function makeRequestAndExpectOne

packages/platform-browser/test/hydration_spec.ts:39–46  ·  view source on GitHub ↗
(
    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,

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…