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

Function validateResponse

tests/e2e/tests/vite/ssr-with-ssl.ts:53–70  ·  view source on GitHub ↗
(
    pathname: string,
    match: RegExp,
    allowH2: boolean,
  )

Source from the content-addressed store, hash-verified

51 await validateResponse('/home', /home works/, false);
52
53 async function validateResponse(
54 pathname: string,
55 match: RegExp,
56 allowH2: boolean,
57 ): Promise<void> {
58 const response = await fetch(new URL(pathname, `https://localhost:${port}`), {
59 dispatcher: new Agent({
60 connect: {
61 allowH2,
62 rejectUnauthorized: false,
63 },
64 }),
65 });
66
67 const text = await response.text();
68 assert.match(text, match);
69 assert.equal(response.status, 200);
70 }
71}

Callers 1

ssr-with-ssl.tsFile · 0.70

Calls 2

textMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected