MCPcopy
hub / github.com/angular/angular / getClientAssignments

Function getClientAssignments

packages/service-worker/worker/test/happy_spec.ts:1517–1523  ·  view source on GitHub ↗
(sw: SwTestHarness, baseHref: string)

Source from the content-addressed store, hash-verified

1515 });
1516
1517 const getClientAssignments = async (sw: SwTestHarness, baseHref: string) => {
1518 const cache = (await sw.caches.original.open(
1519 `ngsw:${baseHref}:db:control`,
1520 )) as unknown as MockCache;
1521 const dehydrated = cache.dehydrate();
1522 return JSON.parse(dehydrated['/assignments'].body!) as any;
1523 };
1524
1525 const initializeSwFor = async (baseHref: string, initialCacheState = '{}') => {
1526 const newDistDir = dist.extend().addFile('/foo.txt', `this is foo v${++uid}`).build();

Callers 1

happy_spec.tsFile · 0.85

Calls 3

openMethod · 0.65
parseMethod · 0.65
dehydrateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…