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

Function callFetchAndFlush

packages/common/http/test/fetch_spec.ts:62–65  ·  view source on GitHub ↗
(req: HttpRequest<any>)

Source from the content-addressed store, hash-verified

60 let fetchSpy: jasmine.Spy<typeof fetch>;
61
62 function callFetchAndFlush(req: HttpRequest<any>): void {
63 backend.handle(req).pipe(take(1)).subscribe();
64 fetchMock.mockFlush(HttpStatusCode.Ok, 'OK', 'some response');
65 }
66
67 beforeEach(() => {
68 TestBed.configureTestingModule({

Callers 1

fetch_spec.tsFile · 0.85

Calls 4

takeFunction · 0.85
subscribeMethod · 0.65
handleMethod · 0.65
mockFlushMethod · 0.45

Tested by

no test coverage detected