MCPcopy Index your code
hub / github.com/angular/angular / makeWorkerRequest

Function makeWorkerRequest

packages/service-worker/worker/test/happy_spec.ts:2892–2910  ·  view source on GitHub ↗
(
  scope: SwTestHarness,
  url: string,
  clientId = 'default',
  resultingClientId = 'worker',
  init?: Object,
)

Source from the content-addressed store, hash-verified

2890}
2891
2892async function makeWorkerRequest(
2893 scope: SwTestHarness,
2894 url: string,
2895 clientId = 'default',
2896 resultingClientId = 'worker',
2897 init?: Object,
2898): Promise<string | null> {
2899 const [resPromise, done] = scope.handleFetch(
2900 new MockRequest(url, {...init, destination: 'worker'}),
2901 clientId,
2902 resultingClientId,
2903 );
2904 await done;
2905 const res = await resPromise;
2906 if (res !== undefined && res.ok) {
2907 return res.text();
2908 }
2909 return null;
2910}
2911
2912function makeNavigationRequest(
2913 scope: SwTestHarness,

Callers 1

happy_spec.tsFile · 0.85

Calls 2

textMethod · 0.65
handleFetchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…