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

Function validateResponse

tests/e2e/tests/vite/ssr-default.ts:30–35  ·  view source on GitHub ↗
(pathname: string, match: RegExp, status = 200)

Source from the content-addressed store, hash-verified

28 await validateResponse('/unknown', /Cannot GET/, 404);
29
30 async function validateResponse(pathname: string, match: RegExp, status = 200): Promise<void> {
31 const response = await fetch(new URL(pathname, `http://localhost:${port}`));
32 const text = await response.text();
33 assert.match(text, match);
34 assert.equal(response.status, status);
35 }
36}

Callers 1

ssr-default.tsFile · 0.70

Calls 2

textMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected