MCPcopy
hub / github.com/angular/angular / FiniteChunkFetchFactory

Class FiniteChunkFetchFactory

packages/common/http/test/fetch_spec.ts:804–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802}
803
804class FiniteChunkFetchFactory extends FetchFactory {
805 override fetch = async (_input: RequestInfo | URL, _init?: RequestInit): Promise<Response> => {
806 const stream = new ReadableStream<Uint8Array>({
807 start: (controller) => {
808 controller.enqueue(new TextEncoder().encode('ok'));
809 controller.close();
810 },
811 });
812
813 return new Response(stream, {
814 status: HttpStatusCode.Ok,
815 statusText: 'OK',
816 headers: {'Content-Type': 'text/plain'},
817 });
818 };
819}
820
821class MockFetchResponse {
822 public url?: string;

Callers

nothing calls this directly

Calls 2

enqueueMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…