MCPcopy Index your code
hub / github.com/angular/angular-cli / checkHeadForUrl

Function checkHeadForUrl

tests/e2e/tests/commands/serve/head-request.ts:16–26  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

14}
15
16async function checkHeadForUrl(url: string): Promise<void> {
17 const result = await fetch(url, { method: 'HEAD' });
18 const content = await result.blob();
19
20 assert.strictEqual(content.size, 0, `Expected "size" to be "0" but got "${content.size}".`);
21 assert.strictEqual(
22 result.status,
23 200,
24 `Expected "status" to be "200" but got "${result.status}".`,
25 );
26}

Callers 1

head-request.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected