MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / getMockResponse

Function getMockResponse

tests/utils.ts:218–232  ·  view source on GitHub ↗
(
  options: {
    status?: number;
    headers?: Record<string, string>;
  } = {},
)

Source from the content-addressed store, hash-verified

216}
217
218export function getMockResponse(
219 options: {
220 status?: number;
221 headers?: Record<string, string>;
222 } = {},
223): HTTPResponse {
224 return {
225 status() {
226 return options.status ?? 200;
227 },
228 headers(): Record<string, string> {
229 return options.headers ?? {};
230 },
231 } as unknown as HTTPResponse;
232}
233
234export function html(
235 strings: TemplateStringsArray,

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected